Skip to content

Instantly share code, notes, and snippets.

@ek-nath
Created March 11, 2022 19:08
Show Gist options
  • Save ek-nath/5ab01e7bd110a3c4550f011a014d765d to your computer and use it in GitHub Desktop.
Save ek-nath/5ab01e7bd110a3c4550f011a014d765d to your computer and use it in GitHub Desktop.
OpenSSH server dockerfile
FROM ubuntu:latest
RUN apt update && apt install openssh-server sudo -y
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 test
RUN echo 'test:test' | chpasswd
RUN service ssh start
EXPOSE 22
CMD ["/usr/sbin/sshd","-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment