|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.maverick.ssh1.Ssh1Context
This class implements SshContext to provide SSH1 connection configuration through the SshConnector class. Currently this provides only one additional feature which is to set the preferred cipher type, however there is currently only one cipher algorithm supported so this feature is reserved for future use. To configure the SSH1 context use the following code:
SshConnector con = SshConnector.getInstance(); Ssh1Context context = (Ssh1Context) con.getContext(SshConnector.SSH1); context.setCipherType(Ssh1Context.CIPHER_3DES);
| Field Summary | |
static int |
CIPHER_3DES
Currently the one and only cipher type supported |
static int |
CIPHER_DES
|
| Constructor Summary | |
Ssh1Context()
Construct a new context instance with default values. |
|
| Method Summary | |
int |
getChannelLimit()
Get the maximum number of channels that are allowed open at any one time. |
int |
getCipherType(int supportedCiphers)
Get the cipher type for this configuration context. |
HostKeyVerification |
getHostKeyVerification()
Get the host key verification implementation. |
java.lang.String |
getSFTPProvider()
Get the path to the SFTP provider. |
byte[] |
getX11AuthenticationCookie()
Get a fake random cookie for X11 authentication |
java.lang.String |
getX11Display()
Get the currently configured XDisplay setting which will be null if no display is currently set. |
byte[] |
getX11RealCookie()
Get the real X11 authentication cookie, if not cookie has been set the fake cookie will be returned. |
ForwardingRequestListener |
getX11RequestListener()
Get the X11 forwarding request listener. |
void |
setChannelLimit(int maxChannels)
Set the maximum number of channels that are allowed open at any one time. |
void |
setCipherType(int preferredCipher)
Set the cipher type for this configuration context. |
void |
setHostKeyVerification(HostKeyVerification verify)
Set the host key verification implementation. |
void |
setSFTPProvider(java.lang.String sftp_path)
Set the path to the SFTP provider. |
void |
setX11Display(java.lang.String xDisplay)
Set the DISPLAY variable for the SSH connection. |
void |
setX11RealCookie(byte[] x11RealCookie)
Sets the real X11 authentication cookie which can be obtained from the users $HOME/.Xauthority file. |
void |
setX11RequestListener(ForwardingRequestListener x11Listener)
Set the listener to which X11 forwarding requests will be processed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CIPHER_DES
public static final int CIPHER_3DES
| Constructor Detail |
public Ssh1Context()
| Method Detail |
public void setChannelLimit(int maxChannels)
SshContext
setChannelLimit in interface SshContextmaxChannels - public int getChannelLimit()
SshContext
getChannelLimit in interface SshContextpublic void setSFTPProvider(java.lang.String sftp_path)
SshContext
setSFTPProvider in interface SshContextsftp_path - public java.lang.String getSFTPProvider()
SshContext
getSFTPProvider in interface SshContextpublic void setX11Display(java.lang.String xDisplay)
SshContext
setX11Display in interface SshContextxDisplay - the display in the form localhost:1public java.lang.String getX11Display()
SshContext
getX11Display in interface SshContext
public byte[] getX11AuthenticationCookie()
throws SshException
SshContext
getX11AuthenticationCookie in interface SshContextSshExceptionpublic void setX11RealCookie(byte[] x11RealCookie)
SshContext
setX11RealCookie in interface SshContextx11RealCookie -
public byte[] getX11RealCookie()
throws SshException
SshContext
getX11RealCookie in interface SshContextSshExceptionpublic void setX11RequestListener(ForwardingRequestListener x11Listener)
SshContext
setX11RequestListener in interface SshContextx11Listener - public ForwardingRequestListener getX11RequestListener()
SshContext
getX11RequestListener in interface SshContext
public int getCipherType(int supportedCiphers)
throws SshException
supportedCiphers -
java.io.IOException
SshExceptionpublic void setCipherType(int preferredCipher)
preferredCipher - one of the supported cipher types, for example CIPHER_3DESpublic void setHostKeyVerification(HostKeyVerification verify)
SshContext
setHostKeyVerification in interface SshContextverify - public HostKeyVerification getHostKeyVerification()
SshContext
getHostKeyVerification in interface SshContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||