How to manage SSH keys securely in Windows?

4

2

I currently have an SSH key I use to access both Bitbucket and my home server from my Windows laptop. The most convenient way I found to deal with the use of the private key was to just have pageant boot on startup, and enter my passphrase then. All well and good, but not terribly secure if someone breaks into my laptop. Since I was already using KeePass for my passwords, I tried switching to KeeAgent, but this didn't seem to improve matters, as I was still faced with the choice of either keeping the key ready for use after entering the passphrase once, or giving it a "lifetime" after which it would drop out of the agent and I'd have to re-add it. That's more secure, but it brings me back to why I set up pageant in the first place - manually re-adding the key is annoying and cumbersome. Typing in the password is fine, but adding the key is an irritant.

I've searched, but I can't seem to find a decent "keyring" application in Windows that could manage access to SSH keys and prompt me for a password each time one needs to be used. Is there anything I'm missing here?

Faqa

Posted 2014-06-14T21:34:46.873

Reputation: 141

great question. does linux have such a thing and if so then perhaps cygwin does – barlop – 2014-06-15T05:41:44.173

is it possible to do a bash script that lets you select the key to use depending on the destination? if you keep removing and adding keys to your key ring it defeats the purpose of the keyring. I suppose you only want the key ring 'cos perhaps it selects keys for you? Why do you want it? I havent used ssh in ages. – barlop – 2014-06-15T06:00:09.777

Pretty much that - I want the ring to select keys for me. Cygwin is an option, I suppose, but I doubt it integrates with Windows apps. – Faqa – 2014-06-15T06:51:43.583

How do you expect ssh to integrate with other apps, it doesn't. It does SSH, it creates a connection and brings up a shell and creates a tunnel for other protocols. And Cygwin alone is no better than what you have. But to get the selection going i'm sure you can do that by the correct command. So you can write it in the scripting language of your OS. e.g. a Batch file for Windows,or Powershell for windows, or Cygwin and bash.Your script would say 1)computerA 2)computerB 3)computer C.And if you hit 2, it logs into computer B with the key for computerB. But some things puzzle me re your request – barlop – 2014-06-15T08:01:13.087

and i'm not even sure that with ssh one is meant to select keys for destination.. or whether you use the one key and the destination recognises it. it has been a while. – barlop – 2014-06-15T08:07:44.673

No answers