docker-sshd/root/etc/s6.d/sshd/run

11 lines
279 B
Plaintext
Raw Normal View History

2017-12-15 14:56:15 +00:00
#!/bin/bash
mkdir -p /root/.ssh
if [[ -n ${SSH_KEY} ]]; then
echo ${SSH_KEY} > /root/.ssh/authorized_keys
chmod 700 /root/.ssh
chmod 600 /root/.ssh/*
fi
sed -i -e "s/#PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config
ssh-keygen -A
/usr/sbin/sshd -D