0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-11-24 12:59:24 -05:00

Concatenate ssh keys to authorized_keys and set correct permissions

This commit is contained in:
Adrian Dvergsdal 2015-06-03 12:03:55 +02:00
parent 932c2264f2
commit a65979595d

View file

@ -35,6 +35,10 @@ for users in "$@"; do
fi fi
echo "$user:$pass" | chpasswd $chpasswdOptions echo "$user:$pass" | chpasswd $chpasswdOptions
cat /home/$user/.ssh/keys/* >> /home/$user/.ssh/authorized_keys
chown $user /home/$user/.ssh/authorized_keys
chmod 600 /home/$user/.ssh/authorized_keys
done done
exec /usr/sbin/sshd -D exec /usr/sbin/sshd -D