intercity / chef-repo

Set up your server to host Ruby on Rails apps. - Follow us on Twitter: @intercityup
MIT License
417 stars 84 forks source link

Asking Multiple times root's password on 'cook' #200

Closed arturictus closed 9 years ago

arturictus commented 9 years ago

Hi, When cooking the server it ask me multiple times the root's password. Checking online I found is caused by Rsync. Is that a natural behavior?, can it be automated?. Thanks. I paste here the cook sequence:

bundle exec knife solo cook root@<ip>
Running Chef on <ip>...
Checking Chef version...
Enter the password for root@<ip>:
Installing Librarian cookbooks...
Uploading the kitchen...
root@<ip>'s password:
root@<ip>'s password:
root@<ip>'s password:
root@<ip>'s password:
root@<ip>'s password:
root@<ip>'s password:
root@<ip>'s password:
Generating solo config...
root@<ip>'s password:
Running Chef...
cvandermeer commented 9 years ago

Because you didn't set up ssh public key.

michiels commented 9 years ago

Hi @arturictus

As @cvandermeer mentioned: you could solve this by adding the SSH key of your workstation (located in ~/.ssh/id_rsa.pub) to the authorized_keys file on your server located at /root/.ssh/authorized_key

If you add your personal key to the root account, it will not ask you a password anymore.

Does this help? Michiel

arturictus commented 9 years ago

Yeah! :+1: Thanks, that make sense :smile: .

michiels commented 9 years ago

Great! :) I'll close this issue.