vscode-sshfs icon indicating copy to clipboard operation
vscode-sshfs copied to clipboard

SSH connection via private key (.pem) file does not work any more

Open stemiwe opened this issue 2 years ago • 3 comments

Using SSH FS v1.26.1 in VSCode 1.77.1 on Manjaro

Some recent upgrade in VSCode or an underlying library must have broken the functionality to connect with unencrypted .pem keys, and encrypted keys do not seem to work.

I am not sure what changed, but a downgrade of VSCode alone to 1.74 did not resolve it.

The problem must be very recent - yesterday SSH FS still worked in any old VSCode windows I had open, but did not work in new ones, indicating a very recent upgrade to something must be to blame. Today, after rebooting, SSH FS connections via private key did not work any more at all.

Problem description

  • Connections using a private key do not work any more, generic error message: image

  • SSH in bash still works for me with the same config/server/private key.

  • After SSH FS stopped working, i tried a couple of other SSH plugins in VSCode, but they did not work either - Pony SSH at least offered an extended error message: Error while signing data with privateKey: error:06000066:public key routines:OPENSSL_internal:DECODE_ERROR

  • After googling this error message I converted my existing private key file into an encrypted .pem using ssh-keygen -p -m PEM -f

  • After this, the other SSH plugins in VSCode worked again, but SSH FS remained with the same error message.

My guess is that something changed in one of the underlying libraries (SSH?)

stemiwe avatar Apr 18 '23 10:04 stemiwe

I have what seems to be the same issue. I tried to modify the sshd config files on the linux server side with no luck.

MichalTrz avatar Apr 19 '23 08:04 MichalTrz

Hello! Same error here.

Temporarily, you can go back to version 1.26.0 to fix it until the bugfix arrives. Changing version, the error is solved.

In my case, it is with .ssh/id_rsa

Emilio0612 avatar Apr 19 '23 09:04 Emilio0612

Same here... after downgrading to 1.26.0, I get an error with a .toml file (it's trying to find a remote pyproject.toml file or something?) but it works

javiercampos avatar Apr 19 '23 15:04 javiercampos