dlech / KeeAgent

ssh agent plugin for KeePass 2.x
http://lechnology.com/software/keeagent
Other
533 stars 35 forks source link

[Feature request] Conditional loading of SSH keys #390

Open schklom opened 1 year ago

schklom commented 1 year ago

I manage SSH keys per client. So my laptop uses one SSH key for all purposes, same for my stationary computers. When I am on my laptop, I want my laptop's SSH key to load. Same when I am on other computers.

I have not found a way to do that on KeeAgent. One machine uses Windows, the other uses Linux, so I can't put the same path for both.

KeePass implemented this condition to allow opening child databases depending on the hostname: https://sourceforge.net/p/keepass/discussion/329220/thread/509d35a111

dlech commented 1 year ago

KeePass implemented this condition to allow opening child databases depending on the hostname

It sounds like this feature could solve your issue.

Another solution could be to use environment variables in the path of an external key file.

schklom commented 1 year ago

It sounds like this feature could solve your issue.

Exactly, but this is only for the plugin KeeAutoExec, hence this feature request :)

Another solution could be to use environment variables in the path of an external key file.

I guess this will do in the meantime.

dlech commented 1 year ago

Exactly, but this is only for the plugin KeeAutoExec, hence this feature request :)

It seems like you can use both extensions together to do what you want. If you use the KeeAutoExec extension to load a per-host database, you can store the SSH keys in that database to get per-host keys.

schklom commented 1 year ago

Not ideal, but it should work. Thanks for the good idea! I think I should keep the issue open because it was not really solved, but feel free to close it if you prefer :)