30.4.14

Using the vagrant insecure keys for dev/test SSH

this is the easiest way to setup passwordless ssh between a few dev/test machines.  Ever......

1) Grab the vagrant-insecure key pair from github.   No need to generate new ones for simple dev machines.
wget --no-check-certificate https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant -O /root/.ssh/id_rsa

wget  --no-check-certificate https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -O /root/.ssh/id_rsa.pub
2) On the head node: Set perms for the keys to 600, and add your public key as an authorized key.
      
       chmod 600 /user/root/.ssh/id_*

cat  /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys 
3) scp your authorized_keys to all other machines
scp -r /root/.ssh/ slave1:/root/
scp -r /root/.ssh/ slave2:/root/
    scp -r /root/.ssh/ slave3:/root/ 
...
That was easy ! Now your "head" machine can ssh passwordlessly into root of all your slaves.

No comments:

Post a Comment