Skip to content

Instantly share code, notes, and snippets.

@steve-gale
Created August 11, 2020 18:37
Show Gist options
  • Save steve-gale/1a78058da08fd8dadd83247d56bc105d to your computer and use it in GitHub Desktop.
Save steve-gale/1a78058da08fd8dadd83247d56bc105d to your computer and use it in GitHub Desktop.
Fargate SSH Debug (dev only)
# Install debug tools
RUN apt-get install -y openssh-server supervisor
RUN mkdir -p /var/run/sshd /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN mkdir /root/.ssh
RUN echo 'YOUR-PUBLIC-KEY-HERE' >> /root/.ssh/authorized_keys
RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
EXPOSE 22/tcp
# Use supervisor for running processes
CMD ["/usr/bin/supervisord"]
[supervisord]
nodaemon=true
username=debug
password=debug
[program:app1]
command=/usr/bin/app1
[program:sshd]
command=/usr/sbin/sshd -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment