mirror of
https://github.com/atmoz/sftp.git
synced 2024-12-22 13:14:42 -05:00
Merge branch 'pieterlange-fix/concat-authorized_keys'
This commit is contained in:
commit
844bcb4409
1 changed files with 3 additions and 1 deletions
|
@ -88,7 +88,9 @@ function createUser() {
|
|||
|
||||
# Add SSH keys to authorized_keys with valid permissions
|
||||
if [ -d /home/$user/.ssh/keys ]; then
|
||||
cat /home/$user/.ssh/keys/* >> /home/$user/.ssh/authorized_keys
|
||||
for publickey in /home/$user/.ssh/keys/*; do
|
||||
cat $publickey >> /home/$user/.ssh/authorized_keys
|
||||
done
|
||||
chown $uid /home/$user/.ssh/authorized_keys
|
||||
chmod 600 /home/$user/.ssh/authorized_keys
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue