Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: SSH Key
PostPosted: Thu Sep 07, 2006 9:54 am 
Offline
Senior Newbie

Joined: Tue Mar 29, 2005 4:44 pm
Posts: 19
I would like information on using keys for my SSH sessions.

Is this hard to do?

b


Top
   
 Post subject:
PostPosted: Thu Sep 07, 2006 2:15 pm 
Offline

Joined: Thu Sep 07, 2006 2:11 pm
Posts: 1
No - see the manpage for ssh-keygen.

Eckhard


Top
   
 Post subject:
PostPosted: Mon Sep 11, 2006 5:56 pm 
Offline
Senior Newbie

Joined: Tue Mar 29, 2005 4:44 pm
Posts: 19
Well I looked at the man pages and had several links bookmarked, but lemme just see if i catch the basics of this:

Public key stored on server, and copied to etc/ssh/authorized_keys(or whatever its called)

Private key stored on client computer, and brought to server upon using SSH

And they somehow compare each other and i'm in?

b


Top
   
 Post subject:
PostPosted: Mon Sep 11, 2006 11:59 pm 
Offline
Senior Newbie

Joined: Sun Aug 06, 2006 7:42 am
Posts: 7
ICQ: 6133132
Website: http://www.luyer.net/
WLM: david@luyer.net
Location: Melbourne, Australia
bd1308 wrote:
Well I looked at the man pages and had several links bookmarked, but lemme just see if i catch the basics of this:

Public key stored on server, and copied to etc/ssh/authorized_keys(or whatever its called)


Public key is copied to ~/.ssh/authorized_keys for the user it is to permit access to (~ representing the home directory of some user).

Quote:
Private key stored on client computer, and brought to server upon using SSH

And they somehow compare each other and i'm in?


Pretty much, except that the private key is never 'brought to' the server. Instead, the server asks the client a question which it could not answer without knowing the private key. The server never knows the actual private key, it just knows that the client knows the private key which corresponds to the public key it has (which is an important point).

(There's also something called 'agent forwarding', which passes from the client to the server a connection which can be passed authentication requests, but still doesn't pass through the actual key.)

As such, you should always generate the key on the client, not the server.

David.


Top
   
 Post subject:
PostPosted: Tue Sep 12, 2006 5:27 am 
Offline
Senior Member

Joined: Thu Sep 23, 2004 8:35 pm
Posts: 73
Location: The Hague, Netherlands
bd1308 wrote:
I would like information on using keys for my SSH sessions.

Is this hard to do?


You might find these articles by Brian Hatch (author of Hacking Linux Exposed) useful:

Secure Passwordless Logins with SSH Part 2

Secure Passwordless Logins with SSH Part 3

Also see his Articles page for more on SSH and security-related issues.

Regards,

Cliff


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group