Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sshd container 1.1.0 #5486

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ public enum PortForwardingContainer {
private Connection createSSHSession() {
String password = UUID.randomUUID().toString();
container =
new GenericContainer<>(DockerImageName.parse("testcontainers/sshd:1.0.0"))
new GenericContainer<>(DockerImageName.parse("testcontainers/sshd:1.1.0"))
.withExposedPorts(22)
.withEnv("PASSWORD", password)
.withCommand(
"sh",
"-c",
// Disable ipv6 & Make it listen on all interfaces, not just localhost
"echo \"root:$PASSWORD\" | chpasswd && /usr/sbin/sshd -D -o PermitRootLogin=yes -o AddressFamily=inet -o GatewayPorts=yes"
// Enable algorithms supported by our ssh client library
"echo \"root:$PASSWORD\" | chpasswd && /usr/sbin/sshd -D -o PermitRootLogin=yes " +
"-o AddressFamily=inet -o GatewayPorts=yes -o AllowAgentForwarding=yes -o AllowTcpForwarding=yes " +
"-o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostkeyAlgorithms=+ssh-rsa "
);
container.start();

Expand Down
2 changes: 1 addition & 1 deletion docs/features/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Some companies disallow the usage of Docker Hub, but you can override `*.image`
> **tinyimage.container.image = alpine:3.14**
> Used to check whether images can be pulled at startup, and always required (unless [startup checks are disabled](#disabling-the-startup-checks))

> **sshd.container.image = testcontainers/sshd:1.0.0**
> **sshd.container.image = testcontainers/sshd:1.1.0**
> Required if [exposing host ports to containers](./networking.md#exposing-host-ports-to-the-container)

> **vncrecorder.container.image = testcontainers/vnc-recorder:1.1.0**
Expand Down