shanenin Posted June 1, 2006 Report Share Posted June 1, 2006 I have an ssh server running on one of my linux boxes with the defaut parmaeters. It is using shane@mainbox ~/.ssh $ ssh -versionOpenSSH_3.9p1, OpenSSL 0.9.7e 25 Oct 2004I 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. Quote Link to post Share on other sites
shanenin Posted June 1, 2006 Author Report Share Posted June 1, 2006 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 commandcat 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"AAAAB3NzaC1yc2EAAAABJQAAAIEAsGPItwp2C722HUroTTdBrljCVk6J5KD8hjfDJu3y62ohZGTR9ONDZ3nyD7UWrmcHhpQ/MpHKfCCU/g286Jzj6xflcnPfq846m4gFrSr/UtgnmpYwRf6rsAxQ/5HKAYCyMfZ2eg7IJYlQIXpDj7GOplecXdFrRHtstpY/HSlAtZc=---- END SSH2 PUBLIC KEY ----I needed it in this formatssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAsGPItwp2C722HUroTTdBrljCVk6J5KD8hjfDJu3y62ohZGTR9ONDZ3nyD7UWrmcHhpQ/MpHKfCCU/g286Jzj6xflcnPfq846m4gFrSr/UtgnmpYwRf6rsAxQ/5HKAYCyMfZ2eg7IJYlQIXpDj7GOplecXdFrRHtstpY/HSlAtZc= rsa-key-20060531none the less, now it is working great. Quote Link to post Share on other sites
iccaros Posted June 1, 2006 Report Share Posted June 1, 2006 from the OPENssh faqBoth 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 KEYFILEPuTTY: 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 needed25Reporting SSH Key IssuesIf 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. Quote Link to post Share on other sites
shanenin Posted June 1, 2006 Author Report Share Posted June 1, 2006 Thanks for the info. If you look at my second post, I sorted it out. Quote Link to post Share on other sites
iccaros Posted June 2, 2006 Report Share Posted June 2, 2006 I know.. but you did not say how.. I post the how.. (even though you probaly just edited the file.. ) Quote Link to post Share on other sites
shanenin Posted June 2, 2006 Author Report Share Posted June 2, 2006 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.