diff options
Diffstat (limited to 'docker/root/etc/s6/openssh/setup')
-rwxr-xr-x | docker/root/etc/s6/openssh/setup | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docker/root/etc/s6/openssh/setup b/docker/root/etc/s6/openssh/setup index f8ef816a95..10d195b74f 100755 --- a/docker/root/etc/s6/openssh/setup +++ b/docker/root/etc/s6/openssh/setup @@ -24,6 +24,13 @@ if [ ! -f /data/ssh/ssh_host_ecdsa_key ]; then ssh-keygen -t ecdsa -b 256 -f /data/ssh/ssh_host_ecdsa_key -N "" > /dev/null fi +if [ -d /etc/ssh ]; then + SSH_PORT=${SSH_PORT:-"22"} \ + envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config + + chmod 0644 /etc/ssh/sshd_config +fi + chown root:root /data/ssh/* chmod 0700 /data/ssh chmod 0600 /data/ssh/* |