Skip to content

Instantly share code, notes, and snippets.

@jacob-pro
Created April 19, 2023 11:38
Show Gist options
  • Save jacob-pro/254b4b6eba0a0386eb3fb36ad1f6aa6a to your computer and use it in GitHub Desktop.
Save jacob-pro/254b4b6eba0a0386eb3fb36ad1f6aa6a to your computer and use it in GitHub Desktop.
Passwordless SSH Gateway Server in Container
FROM oraclelinux:7
RUN yum update && yum install -y openssh-server passwd && yum -y clean all
RUN echo "PermitEmptyPasswords yes" >> /etc/ssh/sshd_config
RUN echo "GatewayPorts yes" >> /etc/ssh/sshd_config
RUN /usr/bin/ssh-keygen -A
RUN passwd -d root
CMD ["/usr/sbin/sshd", "-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment