{ 10 comments… read them below or add one }

1 Dillip 10.17.07 at 11:49 am

Sir

After creation of key in pc-1 (id_rsa.pub) copy to pc-2 as authorized_keys but I am not able to ssh username@pc-2, against it is now asking password.

Kindly help

Dillip Dhala
dkdhal1@gmail.com

2 ns 11.05.07 at 4:42 pm

@Dillip

It might be that you are using SSLv2 in which case you have to copy/append the key to authorized_keys2

3 Malyadri 01.27.08 at 5:48 pm

Good tutorial…..

4 matt 02.29.08 at 5:00 pm

I do something like this:

cat .ssh/id_rsa.pub | ssh user@server “cat >> .ssh/authorized_keys”

5 Mikko 05.07.08 at 1:02 pm

e) Should be like

workstation#2 $ scp ~/.ssh/authorized_keys user@remote.server.com:.ssh/

instead of

workstation#2 $ scp ~/.ssh/id_rsa.pub user@remote.server.com:.ssh/authorized_keys
(this ruins the whole idea)

:)

6 vivek 05.07.08 at 1:34 pm

Mikko,

thanks for the heads up!

7 yh 03.16.09 at 8:40 am

Can i know why need to append own public key to own authorized_keys?
i thought own public key is used for others?
web1 id_rsa.pub append to web2 authorized_keys (correct)
web2 id_rsa.pub append to web1 authorized_keys (correct)
web2 id_rsa.pub append to web2 authorized_keys (doubt)

8 pixeldoc 04.02.09 at 11:00 pm

if you have trouble login to your server, check if /etc/ssh/sshd_config contains Protocol 2
PubkeyAuthentication yes
.

9 Ron 07.24.09 at 11:12 am

Thanks. We have added this to our intranet wiki, just for future ;)

10 Matt 09.08.09 at 6:37 pm

Check out the ssh-copy-id command. It will take care of appending your public key onto the remote system.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: