public class SSHClient extends AbstractSSHClient
_client, alternateSource, client, con, echoCommands, host, keyFile, maxRetries, passphrase, password, port, pvtKey, reader, sock, sshVersion, userName
Constructor and Description |
---|
SSHClient(java.lang.String host,
int port,
java.lang.String userName,
java.io.File keyFile) |
SSHClient(java.lang.String host,
int port,
java.lang.String userName,
java.lang.String password) |
Modifier and Type | Method and Description |
---|---|
void |
echoOff() |
void |
echoOn() |
SSHCommandOutput |
executeCommand(java.lang.String command) |
SSHCommandOutput |
executeCommand(java.lang.String command,
java.lang.String inputData) |
static SSHCommandOutput |
executeCommandAndClose(java.lang.String ip,
int port,
java.lang.String username,
java.lang.String password,
java.lang.String command)
This call will open connection, execute the command and disconnects the connection.
|
static SSHCommandOutput |
executeCommandAndCloseWithRetry(java.lang.String ip,
int port,
java.lang.String username,
java.lang.String password,
java.lang.String command,
int retryCount)
This call will open connection, execute the command and disconnects the connection.
|
static boolean |
executeCommandASync(java.lang.String ip,
int port,
java.lang.String username,
java.lang.String password,
java.lang.String command)
This call will open connection, execute the commands asynchronously by launching a new thread.
|
SSHCommandOutput |
executeCommandV1(java.lang.String command) |
SSHCommandOutput |
executeCommandV1(java.lang.String command,
java.lang.String inputData) |
SSHCommandOutput |
executeNexusCommand(java.lang.String command) |
static int |
getRetryCountForSignatureFailure() |
void |
openShell(java.io.InputStream in) |
com.maverick.ssh.SshSession |
openShell(int columns,
int rows) |
connect, connect, disconnect, getHost, getPort, getSession, isConnected, main, setAlternatePasswordSource
public SSHClient(java.lang.String host, int port, java.lang.String userName, java.lang.String password)
public SSHClient(java.lang.String host, int port, java.lang.String userName, java.io.File keyFile)
public SSHCommandOutput executeCommand(java.lang.String command) throws java.lang.Exception
java.lang.Exception
public void echoOff()
public void echoOn()
public SSHCommandOutput executeCommand(java.lang.String command, java.lang.String inputData) throws java.lang.Exception
java.lang.Exception
public SSHCommandOutput executeNexusCommand(java.lang.String command) throws java.lang.Exception
java.lang.Exception
public SSHCommandOutput executeCommandV1(java.lang.String command) throws java.lang.Exception
java.lang.Exception
public SSHCommandOutput executeCommandV1(java.lang.String command, java.lang.String inputData) throws java.lang.Exception
java.lang.Exception
public com.maverick.ssh.SshSession openShell(int columns, int rows) throws java.lang.Exception
java.lang.Exception
public void openShell(java.io.InputStream in) throws java.lang.Exception
java.lang.Exception
public static SSHCommandOutput executeCommandAndClose(java.lang.String ip, int port, java.lang.String username, java.lang.String password, java.lang.String command) throws java.lang.Exception
ip
- port
- username
- password
- command
- java.lang.Exception
public static SSHCommandOutput executeCommandAndCloseWithRetry(java.lang.String ip, int port, java.lang.String username, java.lang.String password, java.lang.String command, int retryCount) throws java.lang.Exception
ip
- port
- username
- password
- command
- retryCount
- java.lang.Exception
public static boolean executeCommandASync(java.lang.String ip, int port, java.lang.String username, java.lang.String password, java.lang.String command) throws java.lang.Exception
ip
- port
- username
- password
- command
- java.lang.Exception
public static int getRetryCountForSignatureFailure()