0
I have a small cluster with some nodes which share their home folder through NFS. I allow passwordless SSH access to the users with this script:
if [[ -e $homeDirs/$username/.ssh/id_rsa.pub ]]; then
echo "User '$username' already has a public key"
else
su $username -c "ssh-keygen -N ''"
fi
cat $homeDirs/$username/.ssh/id_rsa.pub >> $homeDirs/$username/.ssh/authorized_keys
chown $username:$username $homeDirs/$username/.ssh/authorized_keys
chmod 600 $homeDirs/$username/.ssh/authorized_keys
This has been working properly so far, but now I would like to use zsh shell instead of bash, and it doesn't work anymore. Any clues?
Thanks!!
2As far as I can see, this code should work just fine with
zsh
. What are the error messages, if any? How areusername
andhomeDirs
set? – Adaephon – 2014-02-26T11:13:11.083No error messages, I just get asked for the password. username and homeDisr are set properly also. I think I know what's going on. I don't have installed zsh in the rest of the nodes... could that be the problem? – Pizzicato – 2014-02-26T11:46:38.827
yes it was that... sorry, I fogot to check that...! :-/ Thanks! – Pizzicato – 2014-02-26T11:52:47.560