Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM centos
- RUN yum -y install openssh-server
- RUN useradd remote_user && \
- echo "1234" | passwd remote_user --stdin && \
- mkdir /home/remote_user/.ssh && \
- chmod 700 /home/remote_user/.ssh
- COPY remote-key.pub /home/remote_user/.ssh/authorized_keys
- RUN chown remote_user:remote_user -R /home/remote_user/.ssh/ && \
- chmod 600 /home/remote_user/.ssh/authorized_keys
- RUN /usr/sbin/sshd-keygen
- CMD /usr/sbin/sshd -D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement