public class SSHSession
extends java.lang.Object
| Constructor and Description |
|---|
SSHSession(SSHAuthenticator authenticator) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect() |
void |
exitRoot() |
java.lang.String |
runCommandAndGetOutput(java.lang.String command,
int timeoutInSeconds) |
void |
sendCtrlC() |
void |
sendInput(java.lang.String input) |
void |
sudoToRoot(java.lang.String rootPassword,
java.lang.String sudoOptions) |
public SSHSession(SSHAuthenticator authenticator)
public java.lang.String runCommandAndGetOutput(java.lang.String command,
int timeoutInSeconds)
throws java.io.IOException
java.io.IOExceptionpublic void sendInput(java.lang.String input)
throws java.io.IOException
java.io.IOExceptionpublic void sudoToRoot(java.lang.String rootPassword,
java.lang.String sudoOptions)
throws java.io.IOException
java.io.IOExceptionpublic void exitRoot()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void connect()
throws java.io.IOException,
net.schmizz.sshj.userauth.UserAuthException,
net.schmizz.sshj.transport.TransportException,
net.schmizz.sshj.connection.ConnectionException
java.io.IOExceptionnet.schmizz.sshj.userauth.UserAuthExceptionnet.schmizz.sshj.transport.TransportExceptionnet.schmizz.sshj.connection.ConnectionExceptionpublic void sendCtrlC()
throws java.io.IOException
java.io.IOException