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, setAlternatePasswordSourcepublic 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.Exceptionpublic void echoOff()
public void echoOn()
public SSHCommandOutput executeCommand(java.lang.String command, java.lang.String inputData) throws java.lang.Exception
java.lang.Exceptionpublic SSHCommandOutput executeNexusCommand(java.lang.String command) throws java.lang.Exception
java.lang.Exceptionpublic SSHCommandOutput executeCommandV1(java.lang.String command) throws java.lang.Exception
java.lang.Exceptionpublic SSHCommandOutput executeCommandV1(java.lang.String command, java.lang.String inputData) throws java.lang.Exception
java.lang.Exceptionpublic com.maverick.ssh.SshSession openShell(int columns,
int rows)
throws java.lang.Exception
java.lang.Exceptionpublic void openShell(java.io.InputStream in)
throws java.lang.Exception
java.lang.Exceptionpublic 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.Exceptionpublic 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.Exceptionpublic 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.Exceptionpublic static int getRetryCountForSignatureFailure()