docker-sshd/root/etc/s6.d/sshd/run
Jan Christian Grünhage 04345d7aec
All checks were successful
the build was successful
feat: add dockerfile
2017-12-15 15:56:15 +01:00

11 lines
279 B
Bash
Executable file

#!/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