Friday 25 September 2015

Passwordless access to machine

You have two machines: local and remote. You want to access remote machine from local without being prompted for password every time.

Step1: Generate ssh key pair (public/private) on local machine
ssh-keygen --type rsa --file new_key

Step2: Add newly generated Public key to authorized keys of remote machine
ssh-copy-id -i ~/.ssh/pubrepo.pub tahir@machine2

Step3: Enjoy. You will not be asked password from now on
ssh <user>@remote

No comments:

Post a Comment