DEV Community

Cover image for Dockerize SSH server using Dockerfile
Rajit Paul
Rajit Paul

Posted on

2 1

Dockerize SSH server using Dockerfile

Hope you are having a great day, let us begin this journey :D


Recently I came across a use case where I had to configure a web server on top of a docker container using Ansible, which means I had to set up an ssh server on top of the Docker container for Ansible to gain remote access and automate the configuration process.


So I went on the path of creating an SSH-enabled Docker Image using Dockerfile. We shall be using the Open SSH of the secure shell family in this use-case and centos: latest as the base image for our docker image.

Dockerfile -

Alt Text
You can download the pre-created docker image that I uploaded on Docker-Hub using
docker pull submar1n3/openssh:v1


You can also use the same code and create your own Docker Image -
https://github.com/RajitPaul11/Dockerfile/tree/main/openssh


Thanks for reading, cheers :D

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DevOps for Private APIs. With DreamFactory API Generation, you get:

  • Auto-generated live APIs mapped from database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay