LinuxQuestions.org
Help answer threads with 0 replies.
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 10-26-2004, 07:50 PM   #1
NetAX
Member
 
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 146

Rep: Reputation: 16
public/private key authentication with PuTTY


Since finding out about the automated scripts for SSH logins I decided i wanted to only allow only one user/computer to login remotely. I've successfully run a test configuration with a linux client-computer using the ssh-keygen and all and i was able to access the server with the generated public and private keys.

I'm having trouble doing the same with PuTTY. I dont know how to generate keys with PuTTy. I am using Windows and it obviously does not have the SSH daemon.


Any ideas?
 
Old 10-26-2004, 09:13 PM   #2
nhs
Member
 
Registered: Aug 2003
Location: Edinburgh, Scotland
Distribution: Gentoo
Posts: 246

Rep: Reputation: 30
With PuTTY use the puttygen.exe program to generate a new public/private key pair. The authorized_keys compatible line will be shown in the window. You will have to copy/paste this into a text file which you will have to append to the authorized_keys file on the server. The private key can be saved in it's .ppk file (which looks similar to an ssh private key but which didn't work properly if memory serves). You then set PuTTY to use the .ppk file as the private key and if the server has the public key appended then you should be able to connect fine. plink.exe is a better program to use if you wish to drive PuTTY from the command line or a batch file as it's command line syntax is richer. If I'm not mistaken then the -i option is used to specify a file to use when authenticating.
 
Old 10-27-2004, 02:41 PM   #3
NetAX
Member
 
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 146

Original Poster
Rep: Reputation: 16
thanks for the reply nhs, i dont have the puttygen.exe program. I probably have to go download it from wherever i downloaded putty.
 
Old 10-27-2004, 02:48 PM   #4
nhs
Member
 
Registered: Aug 2003
Location: Edinburgh, Scotland
Distribution: Gentoo
Posts: 246

Rep: Reputation: 30
Google PuTTY turns up the site as the first link. There is a zip file you can download which contains all the programs (putty.exe, pscp.exe, psftp.exe, etc).
 
Old 10-27-2004, 05:26 PM   #5
NetAX
Member
 
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 146

Original Poster
Rep: Reputation: 16
I was able to do the key generation successfully. I denied logins with the root username. Is there any way i can deny other users?
 
Old 10-27-2004, 07:00 PM   #6
nhs
Member
 
Registered: Aug 2003
Location: Edinburgh, Scotland
Distribution: Gentoo
Posts: 246

Rep: Reputation: 30
Not in itself however if you restrict yourself to public/private key authentication then it's (to my knowledge) impossible to login to an account without an authorized_keys file. They will just reject any key.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ssh public key authentication teacup Linux - Networking 4 11-28-2011 12:27 AM
Can someone explain the basics of private-key authentication through SSH? lowpro2k3 Linux - Security 2 06-09-2005 12:22 AM
SSH public/private key authentication with GnuPG keys? thinksincode Linux - Security 1 02-25-2005 03:33 PM
Public key authentication problem Gameon Linux - Security 7 01-02-2004 07:33 AM
RSA public key encryption/private key decription koningshoed Linux - Security 1 08-08-2002 08:25 AM


All times are GMT -5. The time now is 06:00 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration