| 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 SshClientpublic boolean isConnected()
isConnected in interface SshClientprotected JschSshClient.ConnectionWithStreams<com.jcraft.jsch.ChannelExec> execConnection(String command)
public ExecResponse exec(String command)
SshClientpublic String getHostAddress()
getHostAddress in interface SshClientpublic String getUsername()
getUsername in interface SshClientpublic ExecChannel execChannel(String command)
SshClientexecChannel in interface SshClientcommand - command line to invokeCopyright © 2009-2021 The Apache Software Foundation. All Rights Reserved.