Package adams.core.net
Interface SSHSessionProvider
-
- All Known Implementing Classes:
AbstractSSHConnection,AbstractSSHConnectionWithPortForwarding,ScpConnection,SftpRemoteDirectorySetup,SSHConnection,SSHConnection
public interface SSHSessionProviderInterface for classes that provide SSH sessions.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.jcraft.jsch.SessiongetSession()Returns the SSH session.com.jcraft.jsch.SessionnewSession()Returns a new session for the host/port defined in the options.com.jcraft.jsch.SessionnewSession(String host, int port)Returns a new session for the given host/port.
-
-
-
Method Detail
-
getSession
com.jcraft.jsch.Session getSession()
Returns the SSH session. Attempts to reconnect when necessary or create new session when none present.- Returns:
- the SSH session, null if not connected
-
newSession
com.jcraft.jsch.Session newSession()
Returns a new session for the host/port defined in the options.- Returns:
- the session
-
newSession
com.jcraft.jsch.Session newSession(String host, int port)
Returns a new session for the given host/port.- Parameters:
host- the host to create the session for- Returns:
- the session
-
-