You are here

PuTTY: Moving from SecureCRT: SSH2 public keys

5 posts / 0 new
Last post
v4ixapdbm
Offline
Last seen: 16 years 1 month ago
Joined: 2007-06-20 17:15
PuTTY: Moving from SecureCRT: SSH2 public keys

Basically, I want to ditch non-portable, closed SecureCRT and start using PuTTY. I've got a bunch of SSH2 public keys in SecureCRT format.

I would like to import the SSH2 public keys into the putty.reg file. Any method to do this would be easier than reverifying everyone's fingerprints.

If the key on the remote computer is in the form of:

ssh-dss {public key all on one line}

then, SecureCRT simply reformats it like this:

---- BEGIN SSH2 PUBLIC KEY ----
{public key from above, wrapped 68 characters per line}
---- END SSH2 PUBLIC KEY ----

It appears PuTTY converts it to hexadecimal and stores that in the putty.reg file. Either that is incorrect, or PuTTY is doing some additional steps, however, because the beginning of a key might be "AAAA" but the value PuTTY uses does not have similar repetition at the beginning...

If someone has some guidelines for these conversions, that should be all I need. The solution is ultimately in the PuTTY source code, but I'm not that smart... Wink

Thanks.

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 7 years 5 months ago
Joined: 2006-11-18 10:26
puttygen is the key

Get puttygen which can do key format conversion.

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 7 years 5 months ago
Joined: 2006-11-18 10:26
According to the following

According to the following thread, you can use a newer version of SecureCRT to export keys in OpenSSH format which you could then run thru puttygen to convert into putty format.

http://forums.vandyke.com/archive/index.php/t-876.html

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

v4ixapdbm
Offline
Last seen: 16 years 1 month ago
Joined: 2007-06-20 17:15
Thanks for the help.

Thanks for the help. Unfortunately, you're both confusing my public/private keypair (for logging in to SSH-capable boxen), and the SSH public keys for any given box (for which a fingerprint is verified and accepted). I'm sorry if I'm not being clear.

I've already coverted my public/private keypair using puttygen.exe, and it worked great.

Now, I need to somehow import the public keys for all of the hosts I connect to into PuTTY's putty.reg file, so I don't have to re-verify every box's fingerprint. That is the issue at hand. If I knew what PuTTY did to the public key (that is, how PuTTY encodes the public key) before storing it in putty.reg, then I can hopefully manually do this encoding and put the results in the putty.reg file.

v4ixapdbm
Offline
Last seen: 16 years 1 month ago
Joined: 2007-06-20 17:15
Well, I finally broke down

Well, I finally broke down and asked the PuTTY team, and it turns out they have already written a python script to do just what I am looking for[1]. They reference it obscurely in the FAQ[2] (check the last paragraph). The script works great, except that PuTTY prefers RSA and SecureCRT seems to prefer DSA, so I ended up having to manually verify several fingerprints anyway. Oh well, it's better this way.

1. http://svn.tartarus.org/putty/contrib/kh2reg.py?view=markup
2. http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html#faq-hostkeys

Log in or register to post comments