LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-31-2009, 01:12 PM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Rep: Reputation: 50
Import rsa private key into putty


Hi

Is it possible to import rsa private key into putty?

Last edited by cccc; 01-01-2010 at 07:40 PM.
 
Old 01-01-2010, 05:50 AM   #2
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
If you created your rsa identity with openssh's ssh-keygen, you can use it with putty. If you have Pageant running and copied the _private_ key to your machine with putty, just select "Add Key" and select the private key file.

Putty doesn't use the public identity part.
 
Old 01-01-2010, 08:28 AM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by GooseYArd View Post
If you created your rsa identity with openssh's ssh-keygen, you can use it with putty.
I've created public key using:
Code:
ssh-keygen -t rsa
on the linux machine.
Howto import it to putty and which extension should have a public key file?
 
Old 01-01-2010, 08:33 AM   #4
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
if you didn't use "ssh-keygen -t rsa -f my_key", then the two files you get are called:

identity
identity.pub

identity is the private key, identity.pub is the public part.

Copy those files to the machine you run putty on- you can put them anywhere.

Then create a new Putty sessions, and in the options panel, go to Category -> SSH -> Auth and in the box that says "Private key file for authentication", select the "identity" file.

identity.pub contains the public key half that you add to your .ssh/authorized_keys file

hope that helps!

You can also use the Pageant program that is included with putty. Load the "identity" file, and make sure that in SSH -> Auth you have the "Attempt Authentication using Pageant" box checked.

good luck!
 
Old 01-01-2010, 09:48 AM   #5
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by GooseYArd View Post
if you didn't use "ssh-keygen -t rsa -f my_key", then the two files you get are called:

identity
identity.pub

identity is the private key, identity.pub is the public part.

Copy those files to the machine you run putty on- you can put them anywhere.

Then create a new Putty sessions, and in the options panel, go to Category -> SSH -> Auth and in the box that says "Private key file for authentication", select the "identity" file.

identity.pub contains the public key half that you add to your .ssh/authorized_keys file

hope that helps!

You can also use the Pageant program that is included with putty. Load the "identity" file, and make sure that in SSH -> Auth you have the "Attempt Authentication using Pageant" box checked.

good luck!
Thx, I've done how u suggested, but I'm gtting this problem:

Unable to use key file "C:\Support\id_rsa" (OpenSSH SSH-2 private key)
Using username "root".
 
Old 01-01-2010, 10:48 AM   #6
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
my apologies- I forgot all about that. Pageant uses a different ssh2 key format than openssh. There's a way to convert them, but its probably easier to use puttygen to generate an ssh2 key on your windows machine, and then put the contents of the .pub file into your .ssh/authorized_keys file.

If you google for openssh putty ssh2, you may be able to locate the steps to convert the key format. I know its possible but can't remember how to do it.
 
1 members found this post helpful.
Old 01-01-2010, 07:44 PM   #7
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 50
Thx, here is the solution:

http://linux-sxs.org/networking/openssh.putty.html

I've done and it works very well.
 
  


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
How can I import a public key into seahorse? abefroman Linux - Software 1 10-22-2009 12:46 AM
import public/private key for SSH cccc Debian 1 07-22-2009 08:56 AM
Which is better RSA or DSA public key? tarballedtux Linux - Security 12 02-03-2009 06:15 AM
How can i import my RSA key ZAMO Linux - General 6 06-03-2008 04:21 AM
RSA public key encryption/private key decription koningshoed Linux - Security 1 08-08-2002 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:57 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