Putty Ssh-rsa Key


Recommended Posts

I have an ssh server running on one of my linux boxes with the defaut parmaeters. It is using

shane@mainbox ~/.ssh $ ssh -version
OpenSSH_3.9p1, OpenSSL 0.9.7e 25 Oct 2004

I am able to use rsa keys for logging in when my client is running ssh on a linux box also. When I try and use putty to log in I am getting the error "server rejected key" I have used the puttygen program to create both the public and private key. I am not sure why it is not working. Any suggestions woudl be appreciated.

Link to post
Share on other sites

I got it working.

The puttygen program(it creates the key pair) is kind of odd. It creates both a public and private key and then asks you to save them each to thier own file. I took the public key it made and tried to do this command

cat public > /home/shane/.ssh/authorized_keys . The file it saved it to left the key in a strange format, like below

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20060531"
AAAAB3NzaC1yc2EAAAABJQAAAIEAsGPItwp2C722HUroTTdBrljCVk6J5KD8hjfD
Ju3y62ohZGTR9ONDZ3nyD7UWrmcHhpQ/MpHKfCCU/g286Jzj6xflcnPfq846m4gF
rSr/UtgnmpYwRf6rsAxQ/5HKAYCyMfZ2eg7IJYlQIXpDj7GOplecXdFrRHtstpY/
HSlAtZc=
---- END SSH2 PUBLIC KEY ----

I needed it in this format

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAsGPItwp2C722HUroTTdBrljCVk6J5KD8hjfDJu3y62ohZGTR9OND
Z3nyD7UWrmcHhpQ/MpHKfCCU/g286Jzj6xflcnPfq846m4gFrSr/UtgnmpYwRf6rsAxQ/5HKAYCyMfZ2eg7IJYlQIXpDj7GOplecXdFrRHtstpY/HSlAtZc= rsa-key-20060531

none the less, now it is working great.

Link to post
Share on other sites

from the OPENssh faq

Both OpenSSH and PuTTY include mechanisms in their key generator tools to convert keys from other formats to the OpenSSH key format. SourceForge.net uses the OpenSSH key format, but some users of unsupported SSH clients may still wish to connect to SourceForge.net using a familiar SSH client. Do note, however, that we still strongly urge you to use a unique SSH key for each host that you connect to. To convert the key type, do the following (KEYFILE is the filename and path for the SSH private key that is to be converted):

OpenSSH: The ssh-keygen utility will convert a key file from a number of formats to the OpenSSH format, including from the SECSH Public Key File Format used by a number of commercial SSH implementations:

ssh-keygen -i -f KEYFILE

PuTTY: PUTTYGEN.EXE can import and convert some key file formats to the proper type. Follow these steps to do so:

1. Run PUTTYGEN.EXE

2. Select the 'Import key' option from the 'Conversion' menu

3. Select the private key that is to be imported, then click the 'Open' button

4. At this point, you can save the key to the PuTTY .ppk format and the public key can either be copied and pasted from the interface or saved to a file as needed

25

Reporting SSH Key Issues

If the above tips don't help you resolve your key issue, then you should report the issue to SourceForge.net Support. During the issue resolution process we may ask you for information regarding your key, including a copy of the public key data or a key fingerprint. This information can be safely provided in the open without concern as this information is meant to be publicly available and in no way compromises the security of your account. We will, however, never ask for a copy of your SSH private key. You should never provide that key to us or upload it to our hosts.

Link to post
Share on other sites

I know.. but you did not say how.. I post the how.. :)

(even though you probaly just edited the file.. )

Link to post
Share on other sites

actually if you run the puttygen program it allows you to copy the key directly from the gui(its already in the correct format). I am not sure why it also makes a public key file that seems unusable.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...