Run a SSH Server in a Linux container.
Why?
You might want to have an integration test environment to try it out.
docker build -t ssh-server:latest .
docker run -d --name ssh_server ssh-server:latest
or, if you want to expose the SSH port:
docker run -d --name ssh_server -p 2022:22 ssh-server:latest
IP=$(docker inspect -f "{{ .NetworkSettings.Networks.bridge.IPAddress }}" ssh_server)
ssh user@$IP
The container SSH password is Pa$$w0rd123!
.
docker rm --force ssh_server