Sign inSign up

peco602/ssh-linux-docker

By peco602

•Updated over 3 years ago

Run a SSH Server in a Linux container.

Image
0

293

peco602/ssh-linux-docker repository overview

⁠SSH Server Linux Docker image

Run a SSH Server in a Linux container.

Why?

You might want to have an integration test environment to try it out.

⁠Run the container

docker run -d --name ssh_server peco602/ssh-linux-docker:latest

or, if you want to expose the SSH port:

docker run -d --name ssh_server -p 2022:22 peco602/ssh-linux-docker:latest

⁠Connect to the container via SSH

IP=$(docker inspect -f "{{ .NetworkSettings.Networks.bridge.IPAddress }}" ssh_server)
ssh user@$IP

The container SSH password is Pa$$w0rd123!.

⁠Stop the container

docker rm --force ssh_server

⁠GitHub Repository

Tag summary

Content type

Image

Digest

sha256:3ebbfb466…

Size

95.3 MB

Last updated

over 3 years ago

docker pull peco602/ssh-linux-docker