Modifier and Type | Class and Description |
---|---|
static interface |
JschSshClient.Connection<T> |
static interface |
JschSshClient.ConnectionWithStreams<T> |
SshClient.Factory
Constructor and Description |
---|
JschSshClient(ProxyConfig proxyConfig,
BackoffLimitedRetryHandler backoffLimitedRetryHandler,
com.google.common.net.HostAndPort socket,
LoginCredentials loginCredentials,
int timeout,
com.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> agentConnector) |
Modifier and Type | Method and Description |
---|---|
protected <T,C extends JschSshClient.Connection<T>> |
acquire(C connection) |
void |
connect() |
void |
disconnect() |
ExecResponse |
exec(String command)
Execute a process and block until it is complete
|
ExecChannel |
execChannel(String command)
Execute a process and allow the user to interact with it.
|
protected JschSshClient.ConnectionWithStreams<com.jcraft.jsch.ChannelExec> |
execConnection(String command) |
Payload |
get(String path) |
String |
getHostAddress() |
String |
getUsername() |
boolean |
isConnected() |
void |
put(String path,
Payload contents) |
void |
put(String path,
String contents) |
String |
toString() |
@Named(value="jclouds.ssh") protected Logger logger
public JschSshClient(ProxyConfig proxyConfig, BackoffLimitedRetryHandler backoffLimitedRetryHandler, com.google.common.net.HostAndPort socket, LoginCredentials loginCredentials, int timeout, com.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> agentConnector)
protected <T,C extends JschSshClient.Connection<T>> T acquire(C connection)
@PreDestroy public void disconnect()
disconnect
in interface SshClient
public boolean isConnected()
isConnected
in interface SshClient
protected JschSshClient.ConnectionWithStreams<com.jcraft.jsch.ChannelExec> execConnection(String command)
public ExecResponse exec(String command)
SshClient
public String getHostAddress()
getHostAddress
in interface SshClient
public String getUsername()
getUsername
in interface SshClient
public ExecChannel execChannel(String command)
SshClient
execChannel
in interface SshClient
command
- command line to invokeCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.