public class SSHUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULTPORT |
static String |
MODE644 |
| Constructor and Description |
|---|
SSHUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ch.ethz.ssh2.Connection |
connect(String hostname,
int port,
String username,
String password) |
static ch.ethz.ssh2.Connection |
connect(String hostname,
String username,
String password) |
static String |
exec(ch.ethz.ssh2.Connection conn,
String command) |
static String |
exec(ch.ethz.ssh2.Connection conn,
String command,
String out) |
static String |
exec(String hostname,
String username,
String password,
String command) |
static void |
scp(String hostname,
String username,
String password,
String localFile,
String remoteTargetDirectory) |
static void |
scp(String hostname,
String username,
String password,
String localFile,
String remoteTargetDirectory,
String mode) |
public static final String MODE644
public static final int DEFAULTPORT
public static String exec(String hostname, String username, String password, String command) throws IOException
IOExceptionpublic static ch.ethz.ssh2.Connection connect(String hostname, String username, String password) throws IOException
IOExceptionpublic static String exec(ch.ethz.ssh2.Connection conn, String command, String out) throws IOException
IOExceptionpublic static String exec(ch.ethz.ssh2.Connection conn, String command) throws IOException
IOExceptionpublic static ch.ethz.ssh2.Connection connect(String hostname, int port, String username, String password) throws IOException
IOExceptionpublic static void scp(String hostname, String username, String password, String localFile, String remoteTargetDirectory, String mode) throws IOException
IOExceptionpublic static void scp(String hostname, String username, String password, String localFile, String remoteTargetDirectory) throws IOException
IOExceptionCopyright © 2015. All rights reserved.