webssh2 icon indicating copy to clipboard operation
webssh2 copied to clipboard

Auto login using username and private key

Open rushabh-wadkar opened this issue 3 years ago • 1 comments

Hello,

I want to connect to a setup using username and private key of it. We currently store IP address, Username and Private key of the setup account. So, without asking the username and password, we want to connect to the setup automatically. Since there are multiple servers that we want to connect to, so saving private key in config.json file won't work for me! Is there a way so that I can bypass the username & password alert and connect using the server's username and private key?

Question: How can we connect (without the basic auth alert box) using just username and private key of the setup?

Does any one has a solution for it? or Anybody has done it already?

rushabh-wadkar avatar Jan 03 '21 08:01 rushabh-wadkar

This is not hard to do in practice, however how do we protect those keys? Where do they live? Any thoughts on this one?

Integrating with something like a vault would be possible, but a bit of work to get there I think.

I think using a query parameter would be a bad idea for obvious reasons, though it would be possible. Query parameter coupled with HTTPS on the node instance would be better but still not great...

To me, this is almost something like an API call from node to a "vault" to retrieve the key and sign the ssh auth event.

All for this idea, just need to think it through.

billchurch avatar May 18 '21 13:05 billchurch