Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a enviroment of two machines in vagrant where I used the following CentOS image:

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:

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/ vagrant@slave-hostname
cat $HOME/.ssh/ >> $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:… – 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
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.

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

Your Answer


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.