open-remote-ssh
open-remote-ssh copied to clipboard
Other .pub files effect ability to ssh using pubkey
If you have a .pub file that is in an unsupported format of ssh keys. you get the following error:
[Error - 11:03:50.451] Error while parsing SSH public key /home/guy/.ssh/id_rsa.pub:
Error: Unsupported key format
at Object.ee [as parseKey] (/home/guy/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.17-universal/out/extension.js:1:338800)
at /home/guy/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.17-universal/out/extension.js:1:405943
at Array.map (<anonymous>)
at t.gatherIdentityFiles (/home/guy/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.17-universal/out/extension.js:1:405882)
at async /home/guy/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.17-universal/out/extension.js:1:374464
[Trace - 11:03:50.455] Identity keys:
None
[Info - 11:03:50.544] Trying no-auth authentication
[Info - 11:03:50.552] Trying password authentication
The file is a PGP public key that starts with:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Using latest Open SSH.
The MS proprietary ssh extension did seem to handle this.
Sadly the upstream library I use doesn't support this key type.
To support the not common cases like PGP keys and kerberos auth I'll need to do the same as the official extension, use the native ssh binary and parse its output, I chose to use the ssh node library as it was just easier
The issue is not adding support to the format. Its that a .pub file of an unsupported format breaks the plugin pubkey functionality to use other keys in the same folder.
Current workaround was to rename the file with something that does not end in .pub.
:thinking: strange, if there was there was an error parsing any of the keys it should just log the error and will continue parsing the other keys
I can try and create a reproduction, but likely not today