Skip to content

Cannot use my own SSH server in runs #2177

@jvstme

Description

@jvstme

Steps to reproduce

Apply this configuration:

type: task
image: ubuntu

commands:
- apt-get install -y openssh-server
- echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
- echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
- echo "Port 2200" >> /etc/ssh/sshd_config
- echo "root:TESTDSTACK" | chpasswd
- /etc/init.d/ssh restart
- echo Ready
- sleep infinity

Actual behaviour

The run starts, but the CLI cannot attach.

jolly-wombat-1 provisioning completed (running)
Can't connect to the remote host

You may need to try a few times to reproduce.

Services or runs on container-based backends fail immediately after starting.

Expected behaviour

The run starts and the CLI can attach.
The user is able to log into the container using SSH with password authentication. While logging in is tricky with this simplified example, it is a valid use case when the container is connected to a VPN.

Additional information

/etc/init.d/ssh restart seems to kill dstack's SSH server on port 10022.

Related to #1535

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions