Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Doesn't save SSH Host Keys into SshHostKeys #11

Closed
daschu117 opened this issue Nov 14, 2011 · 3 comments
Closed

Doesn't save SSH Host Keys into SshHostKeys #11

daschu117 opened this issue Nov 14, 2011 · 3 comments
Labels

Comments

@daschu117
Copy link

Previous version of PuTTYTray saved ssh host keys into SshHostKeys next to Sessions folder. This was a great feature for syncing across multiple computers using Dropbox. Instead, SSH host key is placed into the registry which breaks the "don't leave a footprint" ideal that some people may desire.

@FauxFaux
Copy link
Owner

I'm having problems reproducing this. I think I managed to do it once, but I can't see how now. Everything works as I expect, all the way down to the "move" dialog:

---------------------------
Security risk
---------------------------
The host key is cached in the Windows registry. Do you want to move it to a file? 

Yes     -> Move to file (and delete from registry)
No      -> Copy to file (and keep in registry)
Cancel  -> nothing will be done

---------------------------
Yes   No   Cancel   
---------------------------

I've tried many combinations, especially around the sshhostkeys directory not existing (either in the filesystem, or the registry, or both). The code is.. overly complex, however, so I could believe that it's broken. See file_verify_host_key and file_store_host_key.

Steps to reproduce, please? :)

@daschu117
Copy link
Author

If I set StorageType to 1 in my saved session files, then they will behave correctly and the key will be stored in the sshhostkeys directory. All of my sessions from the old version of PuTTY Tray had gotten their StorageType set to 0, so this is why none of my old sessions would work correctly.

If I type a connection, it defaults to checking the registry UNLESS I click on "Sessions from file" even though it is already selected upon opening. Clicking "sessions from file" once and either opening or saving the new connection works as expected. This happens when saving a session too, even if "sessions from file" is already selected.

There is another fork of the vanilla PuTTY that has rewritten winstore.c available http://jakub.kotrla.net/putty/ . It handles session files by default seems to do a very good job at it. It doesn't write anything into the registry. Perhaps it would be a good reference?

@xurubin xurubin mentioned this issue Apr 29, 2013
@FauxFaux
Copy link
Owner

The removal of StorageType from the config files under GH-10 should resolve @daschu117's usecase (hah, I knew it was bad!).

This seems to work better now in every case I can think of.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants