public class SSHHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.trilead.ssh2.Connection |
conn |
static org.jspringbot.JSpringBotLogger |
LOG |
protected com.trilead.ssh2.SCPClient |
scpClient |
protected SSHConnectionBean |
sshConnectionBean |
| Constructor and Description |
|---|
SSHHelper(com.trilead.ssh2.Connection conn,
SSHConnectionBean sshConnectionBean) |
| Modifier and Type | Method and Description |
|---|---|
void |
createScp() |
void |
executeCommand(String command) |
String |
executeOutputContent(String command) |
void |
executeOutputContentShouldBe(String command,
String expectedValue) |
void |
executeOutputContentShouldContain(String command,
String value) |
void |
executeWhileOutputIsNot(String command,
String compare,
long sleep,
long timeout) |
void |
put(String localFile,
String remoteDirectory) |
void |
sshConnect() |
void |
sshDisconnect() |
void |
sysOutRemoteFile(String remoteFile) |
public static final org.jspringbot.JSpringBotLogger LOG
protected com.trilead.ssh2.Connection conn
protected SSHConnectionBean sshConnectionBean
protected com.trilead.ssh2.SCPClient scpClient
public SSHHelper(com.trilead.ssh2.Connection conn,
SSHConnectionBean sshConnectionBean)
public void createScp()
public void sshConnect()
throws IOException
IOExceptionpublic void sshDisconnect()
public void sysOutRemoteFile(String remoteFile) throws IOException
IOExceptionpublic void put(String localFile, String remoteDirectory) throws IOException
IOExceptionpublic void executeWhileOutputIsNot(String command, String compare, long sleep, long timeout) throws InterruptedException
InterruptedExceptionpublic void executeOutputContentShouldContain(String command, String value)
public void executeOutputContentShouldBe(String command, String expectedValue)
public void executeCommand(String command)
Copyright © 2018. All rights reserved.