Tuesday, February 09, 2010

Setting up passwordless access on CentOs 5

This has been detailed in various places however the part about setting the right permissions on the .ssh entries made it work for. Here's a step by step procedure


- Generate the keys
ssh-keygen -t rsa -P ""

- copy the key to authorized keys
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

- ensure only the user has read/write/execute permission on the .ssh dir
chmod 700 $HOME/.ssh

- ensure only the user has read/write permission on authorized keys file
chmod 600 $HOME/.ssh/authorized_keys

No comments:

Post a Comment