SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
543 stars 36 forks source link

Couldn't start a terminal for, Unknown DH group error #413

Open zeeskore opened 6 months ago

zeeskore commented 6 months ago

I get the following error when I try to connect to a remote host terminal that is an embedded device requiring the diffie-hellman-group1-sha1 key exchange.

"Couldn't start a terminal for, Unknown DH group"

Using nodejs and ssh2 in javascript, I am able to complete the connection successfully, but not with SSHFS in vscode. Any suggestions?

Here is my sshfs.config in vscode settings.json

"sshfs.configs": [ { "name": "xxxx", "host": "Host IP", "port": "22", "username": "root", "algorithms": { "kex": ["diffie-hellman-group1-sha1"], "cipher": [], "serverHostKey": ["ssh-rsa"], "hmac": [] } ]

zeeskore commented 6 months ago

I think I found the reason for the problem. I am using VS Code 1.83 which uses electronjs and boringSSL that has removed modp1 and modp2 (diffie-hellman-group1-sha1) from the code. So it doesn't work. If we can add an option to SSHFS and ssh2 to use a custom nodejs install that uses openssl, then we can get around this issue. This is still needed for ssh to older hardware like cisco switches.