This class serves as a central configuration point, and as a factory for Session objects configured with these settings. More...
Public Member Functions | |
JSch () | |
Creates a new JSch object. | |
Session | getSession (String username, String host) throws JSchException |
Creates a new Session on port 22. | |
Session | getSession (String username, String host, int port) throws JSchException |
Creates a new Session. | |
void | setHostKeyRepository (HostKeyRepository hkrepo) |
Sets the Host key repository. | |
Protected Member Functions | |
void | addSession (Session session) |
Adds a session to our session pool. | |
boolean | removeSession (Session session) |
Removes a session from our session pool. | |
Package Attributes | |
java.util.Vector | identities = new java.util.Vector() |
Static Package Attributes | |
static java.util.Hashtable | config = new java.util.Hashtable() |
static Logger | logger = DEVNULL |
Private Attributes | |
HostKeyRepository | known_hosts = null |
Static Private Attributes | |
static final Logger | DEVNULL |
A no-op Logger implementation. |
This class serves as a central configuration point, and as a factory for Session objects configured with these settings.
Definition at line 49 of file JSch.java.
com.jcraft.jsch.JSch.JSch | ( | ) |
Creates a new JSch object.
Definition at line 149 of file JSch.java.
References com.jcraft.jsch.JSch.config.
void com.jcraft.jsch.JSch.addSession | ( | Session | session | ) | [protected] |
Adds a session to our session pool.
This is invoked by the sessions on Session#connect, and should supposedly have package-access.
Definition at line 201 of file JSch.java.
Referenced by com.jcraft.jsch.Session.connect().
Session com.jcraft.jsch.JSch.getSession | ( | String | username, | |
String | host, | |||
int | port | |||
) | throws JSchException |
Session com.jcraft.jsch.JSch.getSession | ( | String | username, | |
String | host | |||
) | throws JSchException |
Creates a new Session on port 22.
username | the remote user name to use. | |
host | the host to connect to. |
Definition at line 171 of file JSch.java.
References com.jcraft.jsch.JSch.getSession().
Referenced by edu.rice.cs.hpc.remote.tunnel.SSHManager.connect(), edu.rice.cs.hpc.remote.tunnel.LocalTunneling.connect(), com.jcraft.jsch.JSch.getSession(), and edu.rice.cs.hpc.remote.tunnel.PortForwarding.main().
boolean com.jcraft.jsch.JSch.removeSession | ( | Session | session | ) | [protected] |
Removes a session from our session pool.
This is invoked by the sessions on Session#disconnect, and should supposedly have package-access.
void com.jcraft.jsch.JSch.setHostKeyRepository | ( | HostKeyRepository | hkrepo | ) |
Sets the Host key repository.
This will be used by sessions Session.connect connected} in the future to validate the host keys offered by the remote hosts.
Definition at line 224 of file JSch.java.
References com.jcraft.jsch.JSch.known_hosts.
java.util.Hashtable com.jcraft.jsch.JSch.config = new java.util.Hashtable() [static, package] |
Definition at line 50 of file JSch.java.
Referenced by com.jcraft.jsch.JSch.JSch().
final Logger com.jcraft.jsch.JSch.DEVNULL [static, private] |
java.util.Vector com.jcraft.jsch.JSch.identities = new java.util.Vector() [package] |
Definition at line 134 of file JSch.java.
Referenced by com.jcraft.jsch.ChannelAgentForwarding.write().
HostKeyRepository com.jcraft.jsch.JSch.known_hosts = null [private] |
Definition at line 135 of file JSch.java.
Referenced by com.jcraft.jsch.JSch.setHostKeyRepository().
Logger com.jcraft.jsch.JSch.logger = DEVNULL [static, package] |