how to ssh without password
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
Live Chat!







July 19th, 2007 at 12:51 am
“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.
October 2nd, 2007 at 5:55 pm
I get this error trying to connect with remote server:
Permission denied (publickey,password)
The server also ask me for password
October 2nd, 2007 at 10:04 pm
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.
October 18th, 2007 at 3:05 am
[...] http://linux.byexamples.com/archives/297/how-to-ssh-without-password/ [...]
November 6th, 2007 at 12:24 am
May I know how to send mail with out user name and password
November 6th, 2007 at 12:27 am
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.
June 11th, 2008 at 6:46 pm
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?