Skip to content

Instantly share code, notes, and snippets.

@Aketzu
Created March 1, 2021 10:40
Show Gist options
  • Save Aketzu/47d229c10b3419052f5a17bb5a34419d to your computer and use it in GitHub Desktop.
Save Aketzu/47d229c10b3419052f5a17bb5a34419d to your computer and use it in GitHub Desktop.
Azure App service ssh support
# Azure SSH support
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends openssh-server \
&& echo "root:Docker!" | chpasswd
COPY sshd_config /etc/ssh/
EXPOSE 2222
#Depending on your actual application
COPY start_sshd.sh $SCRIPT_DIR/init_2_start_sshd.sh
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes
Subsystem sftp internal-sftp
#!/bin/bash
mkdir /run/sshd
/usr/sbin/sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment