LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-09-2008, 01:07 AM   #1
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 575

Rep: Reputation: 30
How to add a putty generated .ppk key


Hi,


I want to add a putty generated key(say mykey.ppk) to .ssh/authorized_keys of my Linux box. How can i do it??

Is there a DOC , which helps me to know more about adding keys generated using various tools like putty, openssh,sshkeygen etc...

Will be handy to get one.

Thanks In Advance
 
Old 07-09-2008, 05:54 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Sorry, its been a while since I've looked at putty. Is the .ppk just a public key file? If so, you should be able to (if you've copied the file to your home directory and that is your current directory):

Code:
cat filename.ppk >> .ssh/authorized_keys
Be sure you redirect with two greater than signs (>>). If you use only one (>), it will wipe out anything already in authorized_keys.

If you want to delete or modifiy a line in authorized_keys, it is just an ASCII file so you can edit it with any text editor. Just be aware that the lines are quite long so a given line will probably wrap several times in your display.

Edit: When I speak of editing a line in authorized_keys, I am referring to the beginning of the line where you can add various options. Obviously you would not want to modify a key itself! See the AUTHORIZED_KEYS FILE FORMAT section of the sshd man page for more info. If you don't need/want any of these options then you don't need to worry about editing a line.

Last edited by blackhole54; 07-09-2008 at 06:03 AM.
 
Old 07-10-2008, 07:49 PM   #3
yummycheese
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
open the file back up with puttygen and copy paste the key out of there.

When you open it with putty gen it will give you a box with the instructions
"Public key for pasting into OpenSSH authorized_keys file"

Just remember.

Public key goes into the authorized_keys file on the host you want to ssh into.

Private key stays with you on the box your sshing from.
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
private key for putty melvinong Linux - Server 2 11-13-2007 05:33 AM
PuTTY SSH and PPK Keys colabus Linux - Newbie 1 07-13-2004 10:17 PM
Putty weirding up key mappings jbeninger Linux - Software 0 08-04-2003 09:21 PM
ssh randomly generated key Operations Linux - Security 1 06-10-2002 10:49 PM
ssh randomly generated key Operations *BSD 1 06-10-2002 10:25 AM


All times are GMT -5. The time now is 11:21 AM.

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