SSH Server for Docker containers - clone from jeroenpeeters/docker-ssh
1.1K
If you want to SSH into Docker Container through Docker's Host IP, just use this image to make all running docker container accessible. Reference Source : https://github.com/jeroenpeeters/docker-ssh
First, pull docker ssh server image
$ docker pull iatebes/docker-ssh-server
Conssider that you have running container like this :
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d147ceba4cbd centos "bash" 30 minutes ago Up 30 minutes 0.0.0.0:2222->22/tcp desperate_murdock
So, run SSH Server by this command
$ docker run -e CONTAINER=d1 -e AUTH_MECHANISM=noAuth --name sshd-web-server1 -p 8022:8022 -p 2223:22 --rm -v /var/run/docker.sock:/var/run/docker.sock iatebes/docker-ssh-server
SSH using Docker's Host IP
$ ssh -p 2223 <docker_host_ip>
Content type
Image
Digest
Size
14.4 MB
Last updated
about 10 years ago
docker pull iatebes/docker-ssh-server