Live Chat!

how to ssh without password

3 votos Vota!!

July 18th, 2007 mysurface Posted in Admin, ssh, ssh-copy-id, ssh-keygen | Hits: 48122 |

Search though google, there are a tons of tutorial for accessing a remote site through ssh without a password. I found some tutorial gives too much details. Sometimes, detail’s explanation may confuse the beginners. I just want to make things done, I don’t want to know too much about the public key, private key and network authentication’s stuff. Therefore, I am here to provide the clean steps without further explanation .

Let say you want to access to a machine with IP 10.0.0.4, 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 machine’s door.

ssh-keygen

You 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/id_rsa.pub

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

ssh-copy-id -i ~/.ssh/id_rsa.pub mysurface@10.0.0.4

Done. Now you can ssh 10.0.0.4 with username mysurface without password.

ssh mysurface@10.0.0.4

7 Responses to “how to ssh without password”

  1. “Whatever it appears just press enter until it ends, press enter for passphase as well.”

    It’s perharps a bit dangerous. If someone obtain your ssh key file, he can connect via ssh as he want.

    A password is needed. Having to type it every time not, and ssh-agent (or ssh frontend agent) exists for this reason. You enter your passphrase one time, and that’s all folk.

  2. I get this error trying to connect with remote server:
    Permission denied (publickey,password)

    The server also ask me for password

  3. aitor:

    I get that also for the first time I do that. While doing ssh-keygen, just enter even it asked for password. If you have security concern, maybe you should try out ssh-agent.

  4. May I know how to send mail with out user name and password

  5. I get that also for the first time I do that. While doing ssh-keygen, just enter even it asked for password. If you have security concern, maybe you should try out ssh-agent.

  6. it still asks me for password…the file authorized_keys on the server is updated but still i am asked to pass the password…..
    any sugestions,pls?

Leave a Reply

Security Code: