Sunday, May 20, 2012

Passwordless ssh into a server

You have a machine to which you have to login all the time. and that includes entering your password to authenticate yourself to the server. Taxing! isint it??

A simple quirk is to make yourself "known" to the server so that it doesnt ask you to authenticate yourself everytime you login to the server...

2 steps , thats all you need baby!

* ssh-keygen
* ssh-copy-id <servername>

Consider Host A and Host B. Host A is your local computer and Host B is your Server.

'''On Host A'''
 ssh-keygen
this will create two keys id_rsa and id_rsa.pub in your local machine.

'''On Host A'''
ssh-copy-id mcs112578@palasi.cse.iitd.ac.in
this will copy the id_rsa.pub file into the authenticate keys. Done!

Now try ssh ing into the Server... see the difference !! (No password required !!)

==Don Jaffer==

No comments:

Post a Comment