Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have set up a enviroment of two machines in vagrant where I used the following CentOS image: http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box

Lets call the two machines master and slave.

I would like to be able to talk to the slave from master over password-less ssh, so I followed the instructions in this blog post for setting up password-less ssh: http://www.thecloudavenue.com/2012/01/how-to-setup-password-less-ssh-to.html

The steps in the post would then be:

sudo apt-get install openssh-client
sudo apt-get install openssh-server
ssh-keygen -t rsa -P "" -f ~/.ssh/id_dsa
ssh-copy-id -i $HOME/.ssh/id_dsa.pub vagrant@slave-hostname
cat $HOME/.ssh/id_dsa.pub >> $HOME/.ssh/authorized_keys

The steps works fine and the slave gets the master key written in authorized_keys.

The problem is that the slave keeps asking for password when I try to enter it over SSH from the master.

Are there setting in Vagrant which I need to change in order to get password-less ssh to work?

share|improve this question
    
Have you change the permitions? You can try this: superuser.com/questions/255396/… –  cfreire Jul 6 '13 at 15:14
    
Thanks for pointing out that link. BillThor had an excellent explanation which lead me to the answer. –  Leonard Saers Jul 8 '13 at 13:39
add comment

1 Answer

up vote 1 down vote accepted

The following answer suggested that I have to look at the permission all the way from root to the ssh folder.

http://superuser.com/a/255411/210224

In order to solve the problem I had to add the sticky bit to the home folder.

sudo chmod +t /home

Read the linked answer above for more details.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.