Class SshdContainer
java.lang.Object
org.jenkinsci.test.acceptance.docker.DockerContainer
org.jenkinsci.test.acceptance.docker.fixtures.SshdContainer
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
JavaContainer
Represents a server with SSHD.
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet encrypted Private Key FileGet plaintext Private Key Fileorg.jenkinsci.utils.process.ProcessInputStreampopen(org.jenkinsci.utils.process.CommandBuilder cmd) org.jenkinsci.utils.process.CommandBuilderssh()Gets the SSH command line via unencrypted key.voidsshWithPublicKey(org.jenkinsci.utils.process.CommandBuilder cmd) Login with SSH public key and run some command.Methods inherited from class org.jenkinsci.test.acceptance.docker.DockerContainer
assertRunning, close, cp, getCid, getIpAddress, getLogfile, getPid, inspect, ipBound, ipUdpBound, ipv6Enabled, port, resource, sharingHostDockerService, toString, udpPort
-
Constructor Details
-
SshdContainer
public SshdContainer()
-
-
Method Details
-
getPrivateKey
Get plaintext Private Key File -
getEncryptedPrivateKey
Get encrypted Private Key File -
getPrivateKeyString
-
ssh
public org.jenkinsci.utils.process.CommandBuilder ssh()Gets the SSH command line via unencrypted key. -
sshWithPublicKey
public void sshWithPublicKey(org.jenkinsci.utils.process.CommandBuilder cmd) throws IOException, InterruptedException Login with SSH public key and run some command.- Throws:
IOExceptionInterruptedException
-
popen
public org.jenkinsci.utils.process.ProcessInputStream popen(org.jenkinsci.utils.process.CommandBuilder cmd) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-