0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-12-22 13:14:42 -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
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
exec /usr/sbin/sshd -D