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

Allow user to enter passphrase for configured ssh key #10511

Closed
wmujawar opened this issue Nov 27, 2024 · 1 comment
Closed

Allow user to enter passphrase for configured ssh key #10511

wmujawar opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@wmujawar
Copy link

Type: Feature Request

Show a dialog or some option for user to enter the SSH key passphrase when connecting to remove machine via SSH

Extension version: 0.115.1
VS Code version: Code 1.95.3 (Universal) (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Darwin arm64 24.1.0
Modes:

@vs-code-engineering vs-code-engineering bot added the ssh Issue in vscode-remote SSH label Nov 27, 2024
@joshspicer joshspicer added bug Issue identified by VS Code Team member as probable bug and removed bug Issue identified by VS Code Team member as probable bug labels Dec 9, 2024
@joshspicer
Copy link
Member

Are you instead seeing the password prompt where you expect to see the passphrase prompt?

There is support for entering a passphrase for an SSH key:

Image

I did notice, however, if I removed my key from my ssh-agent (ssh-add -d ) and the configuration didn't state an IdentityFile, then SSH would default to prompting for password. This behavior was the same both within VS Code and directly on the terminal.

I suggest either (1) adding your key with ssh-add to a local auth agent or (2) in your host's configuration ensure you're stating which key you want to use:

Host myHost
    HostName 1.2.3.4
    User josh
    IdentityFile ~/.ssh/my-key # <----

When I did (2) I was able to see the passphrase prompt and connect successfully from VS Code.

Feel free to reopen with some more detailed steps, and i'll be happy to dig in further!

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 23, 2025
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