public interface SSHClient
| Modifier and Type | Interface and Description | 
|---|---|
static interface  | 
SSHClient.CliSession
The SSH CLI session interface. 
 | 
static interface  | 
SSHClient.SecureFileTransfer
SSHCLient file transfer interface 
 | 
static interface  | 
SSHClient.Subsystem
SSHCLient subsystem interface 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static String | 
AUTH_HOSTBASED  | 
static String | 
AUTH_KEYBOARD_INTERACTIVE  | 
static String | 
AUTH_NONE  | 
static String | 
AUTH_PASSWORD  | 
static String | 
AUTH_PUBLIC_KEY
Authentication methods available for negotiation 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
authenticate()
Authenticate using the methods specified by NSO or from
 a cloned connection. 
 | 
void | 
authenticate(String[] methods)
Authenticate using a custom list of methods. 
 | 
void | 
authenticate(String[] methods,
            String user,
            String password)
Authenticate using a custom list of methods, with explicitly
 configured authentication parameters. 
 | 
static SSHClient | 
clone(SSHClient original)
Clone a new SSHClient instance from an existing instance. 
 | 
void | 
close()
Close SSH connection 
 | 
void | 
connect()
Establish the SSH connection using default configuration or
 cloned setup. 
 | 
void | 
connect(int connectTimeout,
       int idleTimeout)
Establish the SSH connection with specific timeouts. 
 | 
void | 
connect(int connectTimeout,
       int idleTimeout,
       InetAddress address,
       int port)
Establish the SSH connection with timeout and address info specified. 
 | 
static SSHClient | 
createClient(NedWorker worker,
            NedConnectionBase ned)
SSHClient default factory method. 
 | 
SSHClient.SecureFileTransfer | 
createSCP()
Instantiate a SCP handler 
 | 
SSHClient.CliSession | 
createSession()
Instantiate a CLI session, default settings 
 | 
SSHClient.CliSession | 
createSession(int width,
             int height)
Instantiate a CLI session with specific terminal size parameters 
 | 
SSHClient.SecureFileTransfer | 
createSFTP()
Instantiate a SFTP handler 
 | 
SSHClient.Subsystem | 
createSubsystem(String name)
Instantiate a subsystem, such as 'netconf' 
 | 
void | 
disableHostKeyVerification()
Explicitly disable host key checking on this connection- 
 | 
String | 
getConnectionInfo()
Get info about the negotiated algorithms etc used for the connection. 
 | 
String | 
getProviderName()
Get name and version of underlying SSH implementation. 
 | 
boolean | 
isAuthenticated()
Authentication status check 
 | 
boolean | 
isConnected()
Connection status check 
 | 
void | 
setRemoteCharset(Charset remoteCharset)
Set charset for sessions started from this connection 
 | 
void | 
setTrafficClass(int tc)
Set traffic class on the socket used by the SSH client. 
 | 
void | 
useCompression()
Enable compression on the SSH channel 
 | 
static final String AUTH_PUBLIC_KEY
static final String AUTH_PASSWORD
static final String AUTH_KEYBOARD_INTERACTIVE
static final String AUTH_NONE
static final String AUTH_HOSTBASED
static SSHClient createClient(NedWorker worker, NedConnectionBase ned) throws IOException
worker - - The NED worker thread.ned - - The NED instanceIOExceptionstatic SSHClient clone(SSHClient original) throws IOException
original - - The SSHClient to cloneIOExceptionString getProviderName()
void connect()
      throws IOException
IOExceptionvoid connect(int connectTimeout,
             int idleTimeout)
      throws IOException
connectTimeout - - Connect timeoutidleTimeout - - Idle timeoutIOExceptionvoid connect(int connectTimeout,
             int idleTimeout,
             InetAddress address,
             int port)
      throws IOException
connectTimeout - - Connect timeoutidleTimeout - - Idle timeoutaddress - - Peer addressport - - Peer portIOExceptionString getConnectionInfo()
void disableHostKeyVerification()
void setRemoteCharset(Charset remoteCharset)
remoteCharset - - Specified charsetvoid authenticate()
           throws IOException
IOExceptionvoid authenticate(String[] methods) throws IOException
methods - - Authentication methods to use in priority order.IOExceptionvoid authenticate(String[] methods, String user, String password) throws IOException
methods - - Authentication methods to use in priority order.
                  Set to null if the methods specified by NSO or
                  from a cloned connection shall be used.user - - Userpassword - - PasswordIOExceptionvoid close()
    throws IOException
IOExceptionboolean isConnected()
boolean isAuthenticated()
void useCompression()
             throws IOException
IOExceptionvoid setTrafficClass(int tc)
              throws SocketException
tc - - Traffic classSocketExceptionSSHClient.CliSession createSession() throws IOException
IOExceptionSSHClient.CliSession createSession(int width, int height) throws IOException
width - - Terminal widthheight - - Terminal heightIOExceptionSSHClient.SecureFileTransfer createSFTP() throws IOException
IOExceptionSSHClient.SecureFileTransfer createSCP() throws IOException
IOExceptionSSHClient.Subsystem createSubsystem(String name) throws IOException
name - - Name of subsystem.IOException