Created
March 1, 2021 10:40
-
-
Save Aketzu/47d229c10b3419052f5a17bb5a34419d to your computer and use it in GitHub Desktop.
Azure App service ssh support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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