LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-18-2009, 01:03 PM   #1
prafulnama
LQ Newbie
 
Registered: Mar 2009
Posts: 10

Rep: Reputation: 0
SSH with PKI


Hi,
I have a problem that sounded extremely simple but I have not been able to solve it for some time now.

When we log into a Linux server (Its debian in my case) using a client like Putty, we get a warning message that the server's key is not trusted. What I was trying to do was, create a certificate request on the server, pass this request to a microsoft certificate authority that we have in our environment, get it approved and install the certificate in the SSH service on the server. Next, I wanted to get putty to recognize the certificate authority as being trusted. I assumed, that after this when I logged in, Putty would recognize the server and not give a warning.

What I have accomplished till now is generating the request and getting it approved. I tried modifying the sshd_config file to use the certificate and the corresponding private key but the service did not restart and gave an error. The biggest problem though, is I think Putty does not recognize the trusted CA's added via the 'certificates' MMC. Even if I manage to add certificates to the server, Putty would not work. Could someone please help me with the above, specifically, how should I install the certificate on the ssh service and a solution for the client (An alternative to Putty or something)

Oh! and accepting the server's signature is not an option. This is aimed at preventing man in the middle attacks and needs to use PKI!!

Thanks!
-p

Last edited by prafulnama; 03-18-2009 at 01:11 PM.
 
Old 03-18-2009, 06:06 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Aren't you confusing SSH's Public Key Authentication with Public Key Infrastructure? You know, X509 certificates? If the message you get is like "authenticity of host X can't be established" then you could read something like http://www.securityfocus.com/infocus/1806 as it explains SSH kost keys wrt preventing MitM attacks. I also think that mcrsft wndws configuration and toolage should not be dealt with in the Linux Security forum as clearly the problem isn't related to GNU/Linux or security. OTOH if I misread your post just say so.
 
Old 03-18-2009, 07:24 PM   #3
prafulnama
LQ Newbie
 
Registered: Mar 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for your reply. I am trying to use X509 certificates in the SSH process for server authentication when a client connects to it. On the link that you mentioned, one of the ways to ascertain the authenticity of the server is to have its host key available somewhere for users to refer to and the other checks the server after logging in, none of which satisfy my requirements. I discovered that the Tectia SSH actually offers this but a) Its not free and it looks as if it supports only Red Hat and Suse. (http://www.ssh.com/support/documenta...ntication.html) Another interesting this that I found was http://my.safaribooksonline.com/0596...g2-appe-SECT-3
Keywords like 'HostCertificateFile' and 'HostKeyFile' are a part of the Tectia ssh_config file only. As far as windows is concerned, I wanted to refer to a CA, can be windows or 3rd party, doesn't matter. Whats important is how do we request and install a certificate for the SSH service.
 
Old 03-18-2009, 07:42 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Unless I'm mistaken only some commercial SSH implementations implement X509. I haven't seen patches for OpenSSH.
 
Old 03-18-2009, 09:10 PM   #5
prafulnama
LQ Newbie
 
Registered: Mar 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Oh! that can explain why I am having so much trouble with something that does not sound extremely complicated. Anyways, if we assume that this is not possible using OpenSSH, does anyone have suggestions for authenticating servers when an SSH connection is initiated that is not distributing hard copies of keys to everyone who has to connect to Linux servers? Thanks!

P.S. In case anyone feels that this might be possible with OpenSSH, I'll be more than grateful for any suggestions :-)

Last edited by prafulnama; 03-18-2009 at 09:19 PM.
 
Old 03-19-2009, 08:05 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
I do recall that you have to make sure that SSH knows to use a particular authentication-strategy, and that it has also been told not to fall-back to simpler ones!

On Linux at least, the command has a "-v" option (read the man-page on this...) that will produce some trace-information as to exactly what it did try when making a new session.
 
Old 03-19-2009, 09:07 AM   #7
prafulnama
LQ Newbie
 
Registered: Mar 2009
Posts: 10

Original Poster
Rep: Reputation: 0
This is the closest thing that I found - http://roumenpetrov.info/openssh/#todo

Its a patch for X509 support with OpenSSH but I do not see a provision for server authentication in it. Interesting though!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum PKI Root Certificate for IE metallica1973 Linux - Security 2 05-30-2007 06:36 PM
How to run PKI Gins Linux - General 2 01-17-2007 12:45 PM
PKI implementation amsri Linux - Networking 0 01-24-2006 07:49 AM
PKI Enabled FTP Client elvinyup Linux - Software 0 09-20-2005 02:31 AM
Pki subban Linux - Enterprise 1 12-19-2004 04:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration