Monday, August 31, 2009

ssh login without a passwd

Let say you want to access to a machine with IP, and make sure you have command ssh, ssh-keygen, ssh-copy-id.

First, generate the key, the key will be used to open the remote machines door.

ssh-keygenYou will see something like that

Enter file in which to save the key (/home/myname/.ssh/id_rsa):Whatever it appears just press enter until it ends, press enter for passphase as well.

Okay, the key will be generated, something looks like ~/.ssh/

Copy over the key to remote machine, and enter your password

ssh-copy-id -i ~/.ssh/ mysurface@ Now you can ssh with username mysurface without password.

ssh mysurface@

No comments:

Post a Comment