Skip to content

Optional passthrase when using SSH key in UI #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
worksofliam opened this issue Jan 19, 2022 · 7 comments
Open

Optional passthrase when using SSH key in UI #472

worksofliam opened this issue Jan 19, 2022 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers. Feel free to ask for help with these!

Comments

@worksofliam
Copy link
Contributor

Needed as a new connection prop

@worksofliam worksofliam added idea Feature suggestion bug A confirmed issue when something isn't working as intended and removed idea Feature suggestion labels Jan 19, 2022
@priceaj
Copy link
Contributor

priceaj commented Jan 20, 2022

If we are doing this for security, then I think SSH2 supports using an SSH agent (e.g. Pagent), which is definitely better than storing the credentials in our extension (even with secure storage). Maybe we should steer people to use that and possibly drop support for storing credentials at all?

Best practice would be to store the SSH Keys in an Agent, and have the extension retreive them from said agent as required. User/password logins should never be used, and keyboard interactive logins should definitely be turned off!!

Here is some 10 year old security advice for your delectation!

https://www.youtube.com/watch?v=_i7v7Of5UPI
https://www.youtube.com/watch?v=ougAC38QCTY

@worksofliam
Copy link
Contributor Author

@priceaj The chances of us dropping credentials right now are very low - I think if we did that, we'd need to add a way to make it easy to generate SSH keys and get them uploaded to IBM i automatically (ssh-copy-id?)

I think what we should do in the meantime, is absolutely warn the user when they log in with a password.

You should log in using an SSH key instead. Would you like to set one up now?

Then the yes button could generate a key, upload it to the system, update their connection settings to point to the key, and then disconnect. What do you think of that?

Also, the original issue here is when using an SSH key + passphrase. Perhaps the passphrase could be a quick popup box where the user needs to enter it in every time they connect like they would when they connect thru a terminal.

@worksofliam
Copy link
Contributor Author

@priceaj Created #475 to continue talking about automatically generating a key. Let's leave this issue for the passphrase.

@worksofliam worksofliam added enhancement New feature or request and removed bug A confirmed issue when something isn't working as intended labels Jan 21, 2022
@ArrowComputingTech
Copy link

Would be good to give the user the option to set up a key if they're using password to login.
Extra nice if it warned them to turn password based logins off on their server every time they log in and it's still on.

Using an agent would mitigate the need for password prompt, but yes if the key isn't found in agent, a one time entry would be appropriate.

@worksofliam worksofliam changed the title Optional passthrase when using SSH key Optional passthrase when using SSH key in UI Apr 20, 2023
@worksofliam worksofliam added the good first issue Good for newcomers. Feel free to ask for help with these! label Apr 20, 2023
@brandonp42
Copy link

Just an idea here - I've started using ssh certificates (with a passphrase on my CA) instead of a passphrase on my actual ssh key and signing it at login for every day with a limited validity period. This has been much more reliable for me vs using ssh agents. It would be nice if I could use that certificate with this plugin. I might look into adding this myself when I get a chance and submitting a PR.

@brandonp42
Copy link

Nevermind about the certificates, the upstream packages don't appear to support them... see mscdex/ssh2#551

@alanseiden
Copy link
Contributor

In discussion with Liam:

  • Server asks client for passphrase
  • IBMi.ts needs event listener defined. When event triggered, show popup box asking for passphrase.

@worksofliam worksofliam self-assigned this Sep 8, 2023
worksofliam added a commit that referenced this issue Sep 8, 2023
@worksofliam worksofliam removed their assignment Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers. Feel free to ask for help with these!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants