May 5, 2014

How to setup password free SSH to hostname/localhost?


cd ~
echo "Removing the OLD .ssh dir"
rm -rf .ssh
ssh-keygen -t rsa
mkdir -p ~/.ssh
cat .ssh/id_rsa.pub >> .ssh/authorized_keys
chmod 700 .ssh; chmod 640 .ssh/authorized_keys
ssh-add
ssh `hostname`

No comments:

Post a Comment