Last active
August 12, 2022 06:41
-
-
Save xorz57/3f12639b85d84f9c7cdf16529298b1a5 to your computer and use it in GitHub Desktop.
Docker Image based on Ubuntu Focal with SSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:focal | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y ssh && \ | |
apt-get clean | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/g' /etc/ssh/sshd_config && \ | |
sed -i 's/#LogLevel INFO/LogLevel INFO/g' /etc/ssh/sshd_config && \ | |
service ssh restart | |
# RUN echo root:root | chpasswd | |
RUN useradd -m -s /bin/bash ubuntu && \ | |
echo ubuntu:ubuntu | chpasswd | |
CMD [ "/usr/sbin/sshd", "-D", "-e" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment