I'm trying to create an SSH server Docker image that can establish multiple concurrent connections:
> sudo /usr/sbin/sshd -Ddp 1234
- Client 1
> ssh user@server -p 1234 user@server's password: ...
- Client 2
> ssh user@server -p 1234 ssh: connect to host server port 1234: Connection refused
The same server machine which has an ssh-server daemon run by systemd does allow for multiple connections.
Is there a way to configure
sshd to run standalone, ie. not with a service manager like systemd, or is
sshd fundamentally only meant to handle a single connection and the concurrency comes from it being managed? If so, what is systemd doing to allow for concurrent connections if it's only told
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (doesn't look like
SSHD_OPTS is being set anywhere)?