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
public class SshdContainer extends DockerContainer
Represents a server with SSHD.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description SshdContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getEncryptedPrivateKey()
Get encrypted Private Key FileFile
getPrivateKey()
Get plaintext Private Key FileString
getPrivateKeyString()
org.jenkinsci.utils.process.ProcessInputStream
popen(org.jenkinsci.utils.process.CommandBuilder cmd)
org.jenkinsci.utils.process.CommandBuilder
ssh()
Gets the SSH command line via unencrypted key.void
sshWithPublicKey(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
-
-
-
-
Method Detail
-
getPrivateKey
public File getPrivateKey()
Get plaintext Private Key File
-
getEncryptedPrivateKey
public File getEncryptedPrivateKey()
Get encrypted Private Key File
-
getPrivateKeyString
public String 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:
IOException
InterruptedException
-
popen
public org.jenkinsci.utils.process.ProcessInputStream popen(org.jenkinsci.utils.process.CommandBuilder cmd) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-