{ 26 comments… read them below or add one }

1 pH July 28, 2008 at 3:21 pm

The permissions of .ssh should not be 755 and 644 for authentication_keys
It should be 700 and 600.

2 Jeremy August 6, 2008 at 1:18 pm

Step 4 refers to a file named “authorized_key” (“chmod 644 ~/.ssh/authorized_key”). It should be “authorized_keys” instead of “authorized_key”.

3 Ramesh August 6, 2008 at 2:45 pm

Jeremy,

Thanks for pointing it out. I had it correct on step#3 and made a typo on step#4.

I have corrected step#4 properly now.

4 shiva chandar December 23, 2008 at 8:47 am

Thank you so much for the information. I got it…!!!!!!!! :)

5 steve nieves September 17, 2009 at 8:19 pm

Thank you. I was not sure if this would apply to my ubuntu system on my netbook but it worked flawlessly.

6 satheesh mohan June 21, 2010 at 11:48 pm

I did everything as mentioned above. But unable to perform scp or ssh without a password prompt.

7 john February 1, 2011 at 4:41 pm

Thanks for the stuff, did just as you exlpained

8 Paul February 11, 2011 at 11:27 pm

Thanks for the notes on how to get ssh-agent up and running. Good concise info. All worked as expected after I followed along with this article.

Thanks!

9 John May 12, 2011 at 3:41 pm

Most excellent article. Clear, concise, and to the point. It works on AIX and OpenSSH versions 0.9.8g and 1.0.0a. Thanks!

10 K.Bala November 2, 2011 at 2:43 am

Thanks..
Good Stuff, it’s worked me..

11 dexter January 28, 2012 at 7:29 am

Hi,

Awesome explaination…I have a doubt…..after connecting to remote host is there any way to come back to the localhost through any command instead of opening a new session.

12 abhay February 5, 2012 at 9:03 pm

Is there anyway I can use Centralized CA to use PKI and What about CISCO devices?

13 Tom February 12, 2012 at 10:58 am

Thank you thank you thank you.

Have been meaning to put a proper backup solution in place for my site, but am a relative noob when it comes to linux. Followed this and it works perfectly, first time

Thanks again!

14 prateek February 14, 2012 at 11:08 pm

Thank u soo much ..

this really works for me .

15 dhongki February 16, 2012 at 9:02 pm

is this possible to use in crontab?

16 dhongki February 16, 2012 at 11:18 pm

the problem i found with this one is that when you close the terminal you have to re-run again the ssh-agent and re-enter a passphrase in ssh-add

17 Michael February 28, 2012 at 12:03 am

Thanks! It works very well.

18 Daniel April 2, 2012 at 4:51 am

Thanks !! its very usefull

19 Deepak April 16, 2012 at 2:59 am

Hi
i followed the above method procedure but the login didnt happen without the password prompt, i have host machine as OSX, and trying to login to remote machine which is launched, on virtual box which is Linux machine.

20 Anonymous June 8, 2012 at 9:17 pm

It is absolutely fantastic blog to learn different stuff regarding the linux

21 blackcat August 7, 2012 at 9:42 am

on step 5 , it doesn’t prompt for passphrase., simply logs-in-to remote server.
But there it still asks for password..

22 siva kesava November 16, 2012 at 9:30 am

This info very useful and clear to generate RAS

Thank you so much

23 Eric Koester November 24, 2012 at 1:32 pm

In step 3, you don’t show HOW to copy the file from the local machine to the remote machine.
Could you fill in that step, please?
Thanks!

24 Haytham A January 11, 2013 at 8:12 pm

Thank for a well written post.
I was able to remote copy without having the ssh-agent running. I don’t think it is a required step.
One of the comments asked for an example of copying from a local to a remote machine. Here is one:
scp mylocalfile userNameForRemoteMachine@remoteMachine:/some/directory/on/remote/machine

Of course instead of a single file you can specify a directory and use the -r directive to copy all its contents recursively.

25 rajesh January 17, 2013 at 6:10 am

Thanks for the steps mentioned
Is it possible to scp using the same steps from linux to windows …
i tried a lot to do it with out password from linux to windows but not able to succeed … Please help if any changes are required or to install some thing else …

26 Pankaj February 17, 2013 at 4:09 pm

Thanks for the info.
I had searched a number of places before I landed here. It really is a concise article. Very clear and easy to follow steps.

Leave a Comment

Previous post:

Next post: