UBUNTU with OpenSSH server and a SUDO "administrator" user
894
This image provides an UBUNTU container with a preinstalled OpenSSH server,
and a SUDO "administrator" user, so that SSH connections will be to a regular user instead of using root.
Assuming that your user has the docker privileges, here is an example for creating and running the container:
docker run -d -t \
-p 22:22 \
-e SUDO_PASSWD=my_admin_user_password \
--name=MySshSudoContainer mbinunn/ubuntu_ssh_server_with_sudo
You should now be able to connect by typing ssh administrator@localhost on your terminal, or via apps like PuTTy.
SUDO_PASSWD = Initializes the sudo "administrator" user's password
ROOT_PASSWD = Initializes the root password of UBUNTU
After making changes, installing software or changing startup.sh, save your own image by using the following command:
docker commit MySshSudoContainer my_own_ssh_with_sudo_image:v1
See my source code on https://github.com/mbinnun/Dockers/tree/main/ubuntu-ssh-server-with-sudo
Content type
Image
Digest
Size
91.8 MB
Last updated
over 5 years ago
docker pull mbinunn/ubuntu_ssh_server_with_sudo