Class SSHSession
java.lang.Object
ecmwf.common.ecauth.SSHSession
-
Constructor Summary
ConstructorsConstructorDescriptionSSHSession
(ECtransSetup setup, String hostname, int port, int sessionTimeOut, String login, String password, byte[] token, boolean debug) Instantiates a new SSH session. -
Method Summary
-
Constructor Details
-
SSHSession
public SSHSession(ECtransSetup setup, String hostname, int port, int sessionTimeOut, String login, String password, byte[] token, boolean debug) throws IOException, com.jcraft.jsch.JSchException Instantiates a new SSH session.- Parameters:
setup
- the setuphostname
- the hostnameport
- the portsessionTimeOut
- the session time outlogin
- the loginpassword
- the passwordtoken
- the tokendebug
- the debug- Throws:
IOException
- Signals that an I/O exception has occurred.com.jcraft.jsch.JSchException
- the jsch exception
-
-
Method Details
-
getDebug
public boolean getDebug()Gets the debug. Gets the debug.- Specified by:
getDebug
in interfaceInteractiveSession
- Returns:
- the debug
-
send
Sends the. Send.- Specified by:
send
in interfaceInteractiveSession
- Parameters:
cmd
- the cmd- Throws:
IOException
- Signals that an I/O exception has occurred.
-
waitfor
Waitfor. Waitfor.- Specified by:
waitfor
in interfaceInteractiveSession
- Parameters:
searchElements
- the search elements- Returns:
- the string
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
isConnected
public boolean isConnected()Checks if is connected. Checks if is connected.- Specified by:
isConnected
in interfaceInteractiveSession
- Returns:
- true, if is connected
-
disconnect
public void disconnect()Disconnect. Disconnect.- Specified by:
disconnect
in interfaceInteractiveSession
-
login
Login.- Parameters:
token
- the token- Throws:
IOException
- Signals that an I/O exception has occurred.
-