Skip to content

Commit 441743c

Browse files
authored
chore: use new sshd:1.2.0 image (#758)
1 parent 090e94f commit 441743c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/testcontainers/src/port-forwarder/port-forwarder.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { LABEL_TESTCONTAINERS_SESSION_ID, LABEL_TESTCONTAINERS_SSHD } from "../u
99

1010
export const SSHD_IMAGE = process.env["SSHD_CONTAINER_IMAGE"]
1111
? ImageName.fromString(process.env["SSHD_CONTAINER_IMAGE"]).string
12-
: ImageName.fromString("testcontainers/sshd:1.1.0").string;
12+
: ImageName.fromString("testcontainers/sshd:1.2.0").string;
1313

1414
class PortForwarder {
1515
constructor(
@@ -124,11 +124,6 @@ export class PortForwarderInstance {
124124
.withExposedPorts(containerPort)
125125
.withEnvironment({ PASSWORD: this.PASSWORD })
126126
.withLabels({ [LABEL_TESTCONTAINERS_SSHD]: "true" })
127-
.withCommand([
128-
"sh",
129-
"-c",
130-
`echo "${this.USERNAME}:$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`,
131-
])
132127
.start();
133128

134129
const host = client.info.containerRuntime.host;

0 commit comments

Comments
 (0)