huashengdun / webssh

:seedling: Web based ssh client
https://webssh.huashengdun.org/
MIT License
4.57k stars 1.3k forks source link

Is there a good way to manage private keys? #77

Closed ghostbody closed 5 years ago

ghostbody commented 5 years ago

webssh is excellent to meet our requirements. However, our machines use RSA key pairs for authentication in which we need to select the private key to login onto the machine through webssh each time.

Is there a better way to do this? I have several ideas:

  1. Set a default file path value for the file uploader. This is impossible due to browser security limits.
  2. Set up a "private keys management system" or "ssh-agent" somewhere. But it's dangerous to store users private keys no matter where I save it, on a server or store it in the web storage (localStorage or IndexDb)

Do you have any good idea? Thanks so much!

huashengdun commented 5 years ago

I don't think storing users' private keys in somewhere is a good idea. Since they are private keys it is right to just let the users keep their private keys. They will take the responsibility for keeping and managing their private keys. If you really want to store the private keys, it is better to store them on client side (browser).