Sign inSign up

afolarin/ubuntu_ssh

By afolarin

Updated almost 11 years ago

Ubuntu Image + openssh-server see here for dockerfile: https://github.com/afolarin/dockeraf/blob/master/ubuntu_ssh

Image
1

50K+

afolarin/ubuntu_ssh repository overview

container root password: theprestige See here for dockerfile: https://github.com/afolarin/dockeraf/blob/master/ubuntu_ssh

FROM     ubuntu 
MAINTAINER Amos Folarin "[email protected]"

# make sure the package repository is up to date (main is already listed by default)
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
# verify repository content (useful if you are doing more than just a oneline sources.list)
RUN cat /etc/apt/sources.list
# update from the repos
RUN apt-get update
# install the ssh server (openssh in this case)
RUN apt-get install -y openssh-server
# setup the run folder for the service
RUN mkdir /var/run/sshd
# add a passowrd for root account
RUN echo 'root:theprestige' |chpasswd
# expose port 22 which sshd listens on
EXPOSE 22
CMD    /usr/sbin/sshd -D

# Example Usage:
# 1. build the docker image with this docker file "ubuntu_ssh", (with repo:tag)
# sudo docker build --tag="afolarin/ubuntu_ssh:sshbox" - < ubuntu_ssh
# 2. run the container (with a name)
# docker run -d --name box1 afolarin/ubuntu_ssh:v1.1
# 3. inspect the interface ip of the container
# ip_box1=$(sudo docker inspect box1 | grep '"IPAddress":' | awk -F'"' '{print $4}')
# 4. ssh from the host onto the container
# ssh root@${ip_box1}
# password "theprestige"

Tag summary

Content type

Image

Digest

sha256:620810f39

Size

68.5 MB

Last updated

almost 11 years ago

docker pull afolarin/ubuntu_ssh:sshbox1