Package org.jclouds.sshj
Class SSHClientConnection
java.lang.Object
org.jclouds.sshj.SSHClientConnection
- All Implemented Interfaces:
SshjSshClient.Connection<net.schmizz.sshj.SSHClient>
public class SSHClientConnection
extends Object
implements SshjSshClient.Connection<net.schmizz.sshj.SSHClient>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SSHClientConnection.Builderbuilder()voidclear()net.schmizz.sshj.SSHClientcreate()booleancom.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> intcom.google.common.net.HostAndPortintnet.schmizz.sshj.SSHClientinthashCode()toString()
-
Field Details
-
logger
-
-
Method Details
-
builder
-
clear
public void clear()- Specified by:
clearin interfaceSshjSshClient.Connection<net.schmizz.sshj.SSHClient>
-
create
- Specified by:
createin interfaceSshjSshClient.Connection<net.schmizz.sshj.SSHClient>- Throws:
Exception
-
getHostAndPort
public com.google.common.net.HostAndPort getHostAndPort()- Returns:
- host and port, where port if not present defaults to
22
-
getLoginCredentials
- Returns:
- login used in this ssh
-
getConnectTimeout
public int getConnectTimeout()- Returns:
- how long to wait for the initial connection to be made
-
getSessionTimeout
public int getSessionTimeout()- Returns:
- how long to keep the ssh open, or
0for indefinitely
-
getAgentConnector
public com.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> getAgentConnector()- Returns:
- Ssh agent connector
-
getSSHClient
public net.schmizz.sshj.SSHClient getSSHClient()- Returns:
- the current ssh or
nullif not connected
-
equals
-
hashCode
public int hashCode() -
toString
-