diff --git a/src/Testcontainers/Containers/PortForwarding.cs b/src/Testcontainers/Containers/PortForwarding.cs index 0fa61a035..dcb768900 100644 --- a/src/Testcontainers/Containers/PortForwarding.cs +++ b/src/Testcontainers/Containers/PortForwarding.cs @@ -61,19 +61,10 @@ public Task ExposeHostPortsAsync(IEnumerable ports, CancellationToken ct [PublicAPI] private sealed class PortForwardingBuilder : ContainerBuilder { - public const string SshdImage = "testcontainers/sshd:1.1.0"; + public const string SshdImage = "testcontainers/sshd:1.2.0"; public const ushort SshdPort = 22; - private const string Command = "echo \"$USERNAME:$PASSWORD\" | chpasswd && /usr/sbin/sshd -D" - + " -o AddressFamily=inet" - + " -o AllowAgentForwarding=yes" - + " -o AllowTcpForwarding=yes" - + " -o GatewayPorts=yes" - + " -o HostkeyAlgorithms=+ssh-rsa" - + " -o KexAlgorithms=+diffie-hellman-group1-sha1" - + " -o PermitRootLogin=yes"; - /// /// Initializes a new instance of the class. /// @@ -114,8 +105,6 @@ protected override PortForwardingBuilder Init() return base.Init() .WithImage(SshdImage) .WithPortBinding(SshdPort, true) - .WithEntrypoint("/bin/sh", "-c") - .WithCommand(Command) .WithUsername("root") .WithPassword("root") .WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(SshdPort));