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:
parent
932c2264f2
commit
a65979595d
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue