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

OpenSSH integration: intercept askpass prompts/support PKCS#11 prompts #3470

Closed
Flameeyes opened this issue Jul 16, 2020 · 8 comments
Closed
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@Flameeyes
Copy link

Currently, there doesn't seem to be any way to provide answers to askpass prompts on Windows, making it impossible to answer prompts such as those introduced by PKCS#11 PIN requests.

If I understand this correctly, currently the SSH support does explicitly prompt the user for password or private key passphrase, but it does so with prompt matching rather than implementing an askpass rpc command.

@roblourens
Copy link
Member

This should still work via the terminal prompt (if you don't see the terminal, setting "remote.SSH.showLoginTerminal": true should force it to appear) but you can also get the askpass route by setting "remote.SSH.useLocalServer": true. This causes other issues for some setups on windows, which is why it's not the default.

@roblourens roblourens transferred this issue from microsoft/vscode Aug 4, 2020
@roblourens roblourens added the ssh Issue in vscode-remote SSH label Aug 4, 2020
@roblourens
Copy link
Member

Also see #3432 for implementing the same prompt matching

@Flameeyes
Copy link
Author

Thanks!

"remote.SSH.useLocalServer": true was already set, but it doesn't seem to make a difference.

"remote.SSH.showLoginTerminal": true does work with the prompt up. I've subscribed to the other issue to follow up on the more human-friendly option :)

@roblourens
Copy link
Member

"remote.SSH.useLocalServer": true was already set, but it doesn't seem to make a difference.

Hm. In your user settings? This is my preferred way forward and the other direction is sort of a workaround. Could you share the log from the Remote-SSH output channel when trying to log in with this set?

@Flameeyes
Copy link
Author

image

Yeah it looks like this was enabled by default for me on my copy. It's on Windows 10.

So I need to make a correction, now that I know what to look for, it does work if I click "details" when it would otherwise timeout, and type in the PIN. So yeah that works better than the other setting :)

@roblourens
Copy link
Member

roblourens commented Aug 4, 2020

Here is the tricky thing, this setting has a platform-specific default and isn't applied on windows unless it is literally configured in your settings.json with "remote.SSH.useLocalServer": true, so just because the checkmark is checked in the UI, doesn't mean it will be applied on Windows. Sorry about this, I need a better solution, vscode doesn't actually support platform-specific defaults for settings right now so it's a workaround.

@Flameeyes
Copy link
Author

Okay setting it straight to the JSON had it explode at first, but it looks like it might have been caused by it defaulting to use Git's SSH binary (I had not realised that Git for Windows install its own, more recent SSH version… it's not first in the PATH!)

remotessh.log

Then I explicitly had it go for the ssh-in-PATH (which is the OpenSSH_for_Windows build), and that… worked perfectly fine!

@roblourens
Copy link
Member

Huh, I don't know why git ssh is crashing, many people use that. But I'm glad you got it working!

@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants