A SSH connection.
| Constructor and description |
|---|
Connection
(Remote remote1, com.jcraft.jsch.Session session1) |
| Type | Name and description |
|---|---|
void |
close()Cleanup the connection and all channels. |
com.jcraft.jsch.ChannelExec |
createExecutionChannel()Create an execution channel. |
com.jcraft.jsch.ChannelSftp |
createSftpChannel()Create a SFTP channel. |
com.jcraft.jsch.ChannelShell |
createShellChannel()Create a shell channel. |
void |
executeCallbackForClosedChannels()Execute registered closures. |
int |
forwardLocalPort(LocalPortForwardSettings settings)Set up local port forwarding. |
void |
forwardRemotePort(RemotePortForwardSettings settings)Set up remote port forwarding. |
boolean |
isAnyPending()Return if any channel is pending. |
java.lang.String |
toString() |
void |
whenClosed(com.jcraft.jsch.Channel channel, groovy.lang.Closure closure)Register a closure called when the channel is closed. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Cleanup the connection and all channels.
Create an execution channel.
Create a SFTP channel.
Create a shell channel.
Execute registered closures. This method throws a BackgroundCommandException if any closure returns an exception.
Set up local port forwarding.
Set up remote port forwarding.
Return if any channel is pending.
Register a closure called when the channel is closed.
channel - the channelclosure - callback closureGroovy Documentation