Change ownership on authorized_keys
This commit is contained in:
parent
d5f0e3620d
commit
abe7fe3174
|
@ -77,6 +77,7 @@ bakeradd()
|
|||
{
|
||||
sudo --user="$user" mkdir "/home/$user/.ssh"
|
||||
cat "$keyfile" >> "/home/$user/.ssh/authorized_keys2"
|
||||
chown "$user:$user" "/home/$user/.ssh/authorized_keys2"
|
||||
chmod 700 "/home/$user/.ssh"
|
||||
chmod 644 "/home/$user/.ssh/authorized_keys2"
|
||||
} && ok
|
||||
|
|
Loading…
Reference in New Issue