X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=ssh-utils%2Fssh-adduser.sh;h=b9da2ec513177b8326ffe1cb958a1dfaf0012860;hb=cd900667cb0aa8008f9335ad0bc2437023ad68e9;hp=250cc7e737608bd358baa7c3676b454b3c98a86c;hpb=19b83dd6fccb1db44426e6e2acfc58da6e3ba9ac;p=webi-installers%2F.git diff --git a/ssh-utils/ssh-adduser.sh b/ssh-utils/ssh-adduser.sh index 250cc7e..b9da2ec 100644 --- a/ssh-utils/ssh-adduser.sh +++ b/ssh-utils/ssh-adduser.sh @@ -25,7 +25,8 @@ echo "me ALL=(ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/me sudo -i -u me bash -c 'ssh-keygen -b 2048 -t rsa -f /home/me/.ssh/id_rsa -q -N ""' mkdir -p /home/me/.ssh/ - cp -r $HOME/.ssh/authorized_keys /home/me/.ssh/ + chmod 0700 /home/me/.ssh/ + cp -r "$HOME/.ssh/authorized_keys" /home/me/.ssh/ chmod 0600 /home/me/.ssh/authorized_keys chown -R me:me /home/me/.ssh/