9 lines
338 B
Docker
9 lines
338 B
Docker
FROM ubuntu:22.04
|
|
RUN apt update && apt install -y openssh-server
|
|
RUN echo 'root:root' | chpasswd
|
|
RUN sed -i 's/#\?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config && \
|
|
sed -i 's/#\?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
|
|
|
RUN mkdir /var/run/sshd
|
|
EXPOSE 22
|
|
CMD ["/usr/sbin/sshd", "-D"] |