public class SshClient extends Object implements Closeable
Constructor and Description |
---|
SshClient(String hostname,
int port,
String username,
char[] password) |
SshClient(String hostname,
int port,
String username,
SshKeyPair pair) |
Modifier and Type | Method and Description |
---|---|
void |
addTask(Runnable task) |
void |
close() |
protected SshClientContext |
createContext(String username) |
protected void |
doConnect(String hostname,
int port,
String username,
SshClientContext sshContext) |
<R> R |
executeTask(Callable<R> task) |
public SshClient(String hostname, int port, String username, char[] password) throws IOException, SshException
IOException
SshException
public SshClient(String hostname, int port, String username, SshKeyPair pair) throws IOException, SshException
IOException
SshException
protected void doConnect(String hostname, int port, String username, SshClientContext sshContext) throws SshException, IOException
SshException
IOException
public void addTask(Runnable task) throws IOException
IOException
protected SshClientContext createContext(String username) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2017. All rights reserved.