Skip to content
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

Improve SSH support with passphrase and host prompts #12756

Merged
merged 15 commits into from
Aug 12, 2021
Merged

Conversation

sergiou87
Copy link
Member

@sergiou87 sergiou87 commented Aug 11, 2021

Closes #3457
Closes #8761

Description

This PR sits on top of #12734

The changes in this PR leverage the new TCP-based askpass trampoline from #11510, by providing that trampoline as the askpass program for SSH too.

That way, we can intercept when SSH prompts stuff to the user (like the SSH key passphrase or adding a host to the list of known hosts).

So far this is only available on Windows because macOS makes it a bit difficult to provide a custom SSH_ASKPASS program. That'll be tackled in a different PR.

Screenshots

Note: the video is kind of a lie, since github.com is added as a host automatically. Users will be prompted about other hosts, though.

Screen.Recording.2021-08-11.at.14.20.00.mov

Release notes

Notes: [Fixed] Prompt SSH info to Windows users, like the key passphrase or adding a host to the list of known hosts

@sergiou87 sergiou87 marked this pull request as ready for review August 11, 2021 12:22
@sergiou87 sergiou87 changed the title Ssh add host Improve SSH support with passphrase and host prompts Aug 11, 2021
Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Tested it out and it works great! On little nit that you can ignore if you like.


/** Should we use SSH askpass? */
export function enableSSHAskPass(): boolean {
return __WIN32__ && enableBetaFeatures()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should the windows check be in the feature-flag? Just figured that once this goes in and someday we remove the feature flag.. will have to move the Windows check to inside the code somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm expecting to have something for macOS soon and remove that Win32 check, so it should be ok 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants