From 28b392f0409fff79282814d127c61b027eaf0667 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 10 Jul 2013 16:03:39 +0100 Subject: Link auth_keys from ~/.ssh after moving it to /etc/ssh/user-authorized-keys/. --- utils/new-publish/setup.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils') diff --git a/utils/new-publish/setup.sh b/utils/new-publish/setup.sh index 04748d2..2d27d27 100755 --- a/utils/new-publish/setup.sh +++ b/utils/new-publish/setup.sh @@ -91,6 +91,8 @@ function setup_ssh_keys() { if [ ! -L $HOME/.ssh/authorized_keys ]; then echo "Moving current account's authorized_keys to /etc/ssh/user-authorized-keys/" cp $HOME/.ssh/authorized_keys /etc/ssh/user-authorized-keys/$SUDO_USER + rm $HOME/.ssh/authorized_keys + ln -s /etc/ssh/user-authorized-keys/$SUDO_USER $HOME/.ssh/authorized_keys fi # Unlike when reside in ~/.ssh/, in /etc/ssh/... auth keys must be readable enough, # or won't be picked up by sshd => login lockout. -- cgit v1.2.3