public interface SshContext extends ExecutorServiceProvider
This interface defines the general configuration items available to both SSH1 and SSH2. Each new instance of SshConnector is initialized with a configuration context for each protocol version. When the user connects to a remote SSH server using the SshConnector the returned SshClient is configured with the context according to the protocol version. Multiple connections can be made from the SshConnector with the same context, and with different instances of SshConnector having different contexts.
SshConnector
,
Ssh1Context
,
Ssh2Context
Modifier and Type | Method and Description |
---|---|
void |
enableFIPSMode()
Deprecated.
This method is out-of-date. Use JCEProvider.initializeDefaultProvider("BCFIPS") passing a FIPS approved JCE provider
in approved mode to restrict algorithms to only those supported by the approved FIPS environment.
|
int |
getChannelLimit()
Get the maximum number of channels that are allowed open at any one time.
|
HostKeyVerification |
getHostKeyVerification()
Get the host key verification implementation.
|
int |
getMessageTimeout() |
String |
getSFTPProvider()
Get the path to the SFTP provider.
|
byte[] |
getX11AuthenticationCookie()
Get a fake random cookie for X11 authentication
|
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.
|
boolean |
isSHA1SignaturesSupported()
Option to disable SHA1 signatures on RSA keys.
|
void |
setChannelLimit(int max)
Set the maximum number of channels that are allowed open at any one time.
|
void |
setHostKeyVerification(HostKeyVerification verify)
Set the host key verification implementation.
|
void |
setMessageTimeout(int messageTimeout) |
void |
setSFTPProvider(String sftpProvider)
Set the path to the SFTP provider.
|
void |
setSHA1SignaturesSupported(boolean supportSHA1Signatures)
Option to disable SHA1 signatures on RSA keys.
|
void |
setX11AuthenticationCookie(byte[] x11FakeCookie)
Set the fake cookie used for X11 authentication
|
void |
setX11Display(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 listener)
Set the listener to which X11 forwarding requests will be processed.
|
getExecutorService, setExecutorService
void setChannelLimit(int max)
max
- int getChannelLimit()
void setHostKeyVerification(HostKeyVerification verify)
verify
- HostKeyVerification getHostKeyVerification()
void setSFTPProvider(String sftpProvider)
sftpProvider
- String getSFTPProvider()
void setX11Display(String xDisplay)
xDisplay
- the display in the form localhost:1String getX11Display()
byte[] getX11AuthenticationCookie() throws SshException
SshException
void setX11AuthenticationCookie(byte[] x11FakeCookie)
x11FakeCookie
- void setX11RealCookie(byte[] x11RealCookie)
x11RealCookie
- byte[] getX11RealCookie() throws SshException
SshException
void setX11RequestListener(ForwardingRequestListener listener)
listener
- ForwardingRequestListener getX11RequestListener()
void setMessageTimeout(int messageTimeout)
messageTimeout
- int getMessageTimeout()
@Deprecated void enableFIPSMode() throws SshException
SshException
boolean isSHA1SignaturesSupported()
void setSHA1SignaturesSupported(boolean supportSHA1Signatures)
supportSHA1Signatures
- Copyright © 2024. All rights reserved.