Package org.jenkinsci.test.acceptance
Class Ssh
- java.lang.Object
-
- org.jenkinsci.test.acceptance.Ssh
-
- All Implemented Interfaces:
AutoCloseable
public class Ssh extends Object implements AutoCloseable
- Author:
- Vivek Pandey
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
void
copyTo(String localFile, String remoteFile, String targetDir)
void
destroy()
Deprecated.useclose()
static String
escape(String path)
Escapes a path to a form suitable for use on a command-line.int
executeRemoteCommand(String cmd)
Execute remote command, log output using System.out *int
executeRemoteCommand(String cmd, OutputStream os)
com.trilead.ssh2.Connection
getConnection()
Get the connection and authenticate before using any method
-
-
-
Constructor Detail
-
Ssh
public Ssh(String hostname) throws IOException
- Throws:
IOException
-
-
Method Detail
-
escape
public static String escape(String path)
Escapes a path to a form suitable for use on a command-line.- Parameters:
path
- the path.- Returns:
- the escaped path.
-
getConnection
public com.trilead.ssh2.Connection getConnection()
Get the connection and authenticate before using any method
-
executeRemoteCommand
public int executeRemoteCommand(String cmd, OutputStream os)
-
executeRemoteCommand
public int executeRemoteCommand(String cmd)
Execute remote command, log output using System.out *
-
copyTo
public void copyTo(String localFile, String remoteFile, String targetDir) throws IOException
- Throws:
IOException
-
destroy
@Deprecated public void destroy()
Deprecated.useclose()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-