Simple SSH public/private key question

Posted by James R. on Server Fault See other posts from Server Fault or by James R.
Published on 2010-12-23T02:49:56Z Indexed on 2010/12/23 2:55 UTC
Read the original article Hit count: 431

Filed under:
|
|

I am trying to learn this instead of just following guides so I can recommend proper actions when people do ask (and they do). Here is what I got down.

First, generate both key with command such as this:

ssh-keygen -b 2048 -t rsa -C comment -f ~/.ssh/id_rsa

Then you push the public part of the key into authorized_keys2 file

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys2

(and then chmod it to 600 or similar)

And you download the private key to your computer (id_rsa) and feed that in to Putty to be read and authenticate.

Are these the correct steps to setting this public/private key authentication for passwordless login to SSH?

© Server Fault or respective owner

Related posts about ssh

Related posts about public-key