@Deprecated
public class SSHSession
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
SSHSession(java.lang.String username,
java.lang.String server,
java.lang.String pass)
Deprecated.
Establish a connection with the remote host
|
protected |
SSHSession(java.lang.String username,
java.lang.String server,
java.lang.String pass,
java.lang.String identity_file)
Deprecated.
Establish a connection with the remote host
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
disconnect()
Deprecated.
Disconnection
|
protected java.lang.String[] |
executeCommand(java.lang.String command)
Deprecated.
Execute the command in the remote host.
|
protected java.lang.String[] |
executeCommand(java.lang.String command,
java.lang.String input)
Deprecated.
Execute the command in the remote host.
|
protected java.lang.String |
getFileFromRemoteHost(java.lang.String local_file,
java.lang.String remote_file)
Deprecated.
Get the remote file and store it in the local host via scp
|
protected java.lang.String |
getHost()
Deprecated.
Return host name
|
protected java.lang.String |
getPass()
Deprecated.
Return pass
|
protected java.lang.String |
getUser()
Deprecated.
Return user name
|
protected java.lang.String |
sendFileToRemoteHost(java.lang.String local_file,
java.lang.String remote_file)
Deprecated.
Send the local file to the remote host via scp
|
protected SSHSession(java.lang.String username,
java.lang.String server,
java.lang.String pass)
username - User nameserver - Remote hostpass - User passwordprotected SSHSession(java.lang.String username,
java.lang.String server,
java.lang.String pass,
java.lang.String identity_file)
username - User nameserver - Remote hostpass - User passwordidentity_file - Identity fileprotected void disconnect()
protected java.lang.String[] executeCommand(java.lang.String command)
throws java.lang.Exception
command - shell command to executejava.lang.Exceptionprotected java.lang.String[] executeCommand(java.lang.String command,
java.lang.String input)
throws java.lang.Exception
command - shell command to executeinput - Standard inputjava.lang.Exceptionprotected java.lang.String getFileFromRemoteHost(java.lang.String local_file,
java.lang.String remote_file)
throws java.io.IOException,
com.jcraft.jsch.JSchException
local_file - Local pathremote_file - Remote pathjava.io.IOExceptioncom.jcraft.jsch.JSchExceptionprotected java.lang.String sendFileToRemoteHost(java.lang.String local_file,
java.lang.String remote_file)
throws java.io.IOException,
com.jcraft.jsch.JSchException
local_file - Local pathremote_file - Remote path (including the file name)java.io.IOExceptioncom.jcraft.jsch.JSchExceptionprotected java.lang.String getUser()
protected java.lang.String getHost()
protected java.lang.String getPass()