VS Code ssh with fido2 security keys (yubikey) not prompting for pin on linux
04:41 11 Apr 2025

I would like to authenticate to a remote SSH server via VS Code using FIDO2 SSH security keys (ed25519_sk). However, VS Code never prompts me for the PIN to unlock the key on the security device, nor does it request the touch prompt (directly goes to password auth). When I try a regular SSH key (non-FIDO2), it works correctly.

I have added the key in the SSH config file, but VS Code instantly asks for the password, ignoring the key. Even when I enable the "remote.SSH.showLoginTerminal" setting, it still immediately shows the password prompt, bypassing the key. Unfortunately, I cannot use ssh-agent as it currently doesn't work with FIDO2 keys when the "verify required" option is set.

Also, when I use the integrated terminal in VS Code (set to external bash) and try to SSH into the same server while specifying the FIDO2 SSH key, it also ignores it and moves to the password prompt.

Has anyone successfully used FIDO2 SSH keys with VS Code's remote SSH? Any input is appreciated.

Thanks!

visual-studio-code ssh fido