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

All configured authentication methods failed in 1.26.1 but not in 1.26.0 #385

Open Xigma101 opened 1 year ago

Xigma101 commented 1 year ago

The current issue being presented is only happening in version 1.26.1 for a collegue of mine, I am also using the same version and connecting to the same server with the same SSH encryption, ed25519, and currently experiencing no issues.

I've set the debug flag to "DEBUG_SSH2" in SSH FS and grabbed this log from when they tried to connect to the server.

` [INFO]    Version history: 1.26.0:1681892628828:1681892628828 > 1.26.1:1681892628828:1681917376342

[INFO]    [createConnection(,config)] Creating a new connection for ''

[INFO]    Calculating actual config

[DEBUG]     Read private key from /Users//.ssh/id_ed25519

[DEBUG]     Final configuration:

{

    "name": "",

    "privateKeyPath": "/Users//.ssh/id_ed25519",

    "passphrase": "",

    "host": "85.92.73.67",

    "username": "",

    "password": "",

    "_location": 1,

    "_locations": [

        1

    ],

    "_calculated": {

        "name": "",

        "privateKeyPath": "/Users//.ssh/id_ed25519",

        "passphrase": "",

        "host": "",

        "username": "",

        "password": "",

        "_location": 1,

        "_locations": [

            1

        ]

    },

    "port": 22,

    "privateKey": "Buffer(484)"

}

[INFO]    [createSocket()] Creating socket

[DEBUG]   [createSocket()] Connecting to

[INFO]    [createSSH()] Flag "OPENSSH-SHA1" enabled due to 'missing', including convertSha1 for publickey authentication

[INFO]    [createSSH()] Flag "OPENSSH-SHA1" enabled due to 'missing'

[DEBUG]   [ssh2()] Custom crypto binding not available

[DEBUG]   [ssh2()] Local ident: 'SSH-2.0-ssh2js1.11.0'

[DEBUG]   [ssh2()] Socket connected

[DEBUG]   [ssh2()] Remote ident: 'SSH-2.0-OpenSSH_7.4'

[DEBUG]   [ssh2()] Outbound: Sending KEXINIT

[DEBUG]   [ssh2()] Inbound: Handshake in progress

[DEBUG]   [ssh2()] Handshake: (local) KEX method: curve25519-sha256@libssh.org,curve25519-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group15-sha512,diffie-hellman-group16-sha512,diffie-hellman-group17-sha512,diffie-hellman-group18-sha512

[DEBUG]   [ssh2()] Handshake: (remote) KEX method: diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,curve25519-sha256,curve25519-sha256@libssh.org,gss-gex-sha1-,gss-group14-sha1-

[DEBUG]   [ssh2()] Handshake: KEX algorithm: curve25519-sha256@libssh.org

[DEBUG]   [ssh2()] Handshake: (local) Host key format: ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa

[DEBUG]   [ssh2()] Handshake: (remote) Host key format: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519

[DEBUG]   [ssh2()] Handshake: Host key format: ssh-ed25519

[DEBUG]   [ssh2()] Handshake: (local) C->S cipher: aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr

[DEBUG]   [ssh2()] Handshake: (remote) C->S cipher: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com

[DEBUG]   [ssh2()] Handshake: C->S Cipher: aes128-gcm@openssh.com

[DEBUG]   [ssh2()] Handshake: (local) S->C cipher: aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr

[DEBUG]   [ssh2()] Handshake: (remote) S->C cipher: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com

[DEBUG]   [ssh2()] Handshake: S->C cipher: aes128-gcm@openssh.com

[DEBUG]   [ssh2()] Handshake: (local) C->S MAC: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1

[DEBUG]   [ssh2()] Handshake: (remote) C->S MAC: hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,umac-128@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com

[DEBUG]   [ssh2()] Handshake: C->S MAC:

[DEBUG]   [ssh2()] Handshake: (local) S->C MAC: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1

[DEBUG]   [ssh2()] Handshake: (remote) S->C MAC: hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,umac-128@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com

[DEBUG]   [ssh2()] Handshake: S->C MAC:

[DEBUG]   [ssh2()] Handshake: (local) C->S compression: none,zlib@openssh.com,zlib

[DEBUG]   [ssh2()] Handshake: (remote) C->S compression: none,zlib@openssh.com

[DEBUG]   [ssh2()] Handshake: C->S compression: none

[DEBUG]   [ssh2()] Handshake: (local) S->C compression: none,zlib@openssh.com,zlib

[DEBUG]   [ssh2()] Handshake: (remote) S->C compression: none,zlib@openssh.com

[DEBUG]   [ssh2()] Handshake: S->C compression: none

[DEBUG]   [ssh2()] Outbound: Sending KEXECDH_INIT

[DEBUG]   [ssh2()] Received DH Reply

[DEBUG]   [ssh2()] Host accepted by default (no verification)

[DEBUG]   [ssh2()] Host accepted (verified)

[DEBUG]   [ssh2()] Outbound: Sending NEWKEYS

[DEBUG]   [ssh2()] Inbound: NEWKEYS

[DEBUG]   [ssh2()] Verifying signature ...

[DEBUG]   [ssh2()] Verified signature

[DEBUG]   [ssh2()] Handshake completed

[DEBUG]   [ssh2()] Outbound: Sending SERVICE_REQUEST (ssh-userauth)

[DEBUG]   [ssh2()] Inbound: Received SERVICE_ACCEPT (ssh-userauth)

[DEBUG]   [ssh2()] Outbound: Sending USERAUTH_REQUEST (none)

[DEBUG]   [ssh2()] Inbound: Received USERAUTH_FAILURE (publickey,gssapi-keyex,gssapi-with-mic)

[DEBUG]   [ssh2()] Client: none auth failed

[DEBUG]   [ssh2()] Outbound: Sending USERAUTH_REQUEST (password)

[DEBUG]   [ssh2()] Inbound: Received USERAUTH_FAILURE (publickey,gssapi-keyex,gssapi-with-mic)

[DEBUG]   [ssh2()] Client: password auth failed

[DEBUG]   [ssh2()] Skipping invalid key auth attempt

[DEBUG]   [ssh2()] Outbound: Sending USERAUTH_REQUEST (keyboard-interactive)

[DEBUG]   [ssh2()] Inbound: Received USERAUTH_FAILURE (publickey,gssapi-keyex,gssapi-with-mic)

[DEBUG]   [ssh2()] Client: keyboard-interactive auth failed

[ERROR]   [createSSH()] Error: All configured authentication methods failed

JSON: {"level":"client-authentication"}

Error: All configured authentication methods failed

  at _e (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:97846)

  at Ie (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:100799)

  at USERAUTH_FAILURE (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:89153)

  at 51 (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:241614)

  at e.exports.D (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:111513)

  at D.decrypt (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:205168)

  at e.exports.H [as _parse] (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:111037)

  at e.exports.parse (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:114840)

  at Socket. (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:96586)

  at Socket.emit (node:events:526:28)

Logged at:

  at e.exports.emit (node:events:526:28)

  at _e (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:97948)

  at Ie (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:100799)

  at USERAUTH_FAILURE (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:89153)

  at 51 (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:241614)

Reported by logger createSSH()

[DEBUG]   [ssh2()] Outbound: Sending DISCONNECT (11)

[ERROR]   Error while connecting to SSH FS :

Error: All configured authentication methods failed

JSON: {"level":"client-authentication"}

Error: All configured authentication methods failed   at _e (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:97846)

  at Ie (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:100799)

  at USERAUTH_FAILURE (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:89153)

  at 51 (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:241614)

  at e.exports.D (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:111513)

  at D.decrypt (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:205168)

  at e.exports.H [as _parse] (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:111037)

  at e.exports.parse (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:114840)

  at Socket. (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/14f8.extension.js:1:96586)

  at Socket.emit (node:events:526:28)

Caused by catchingPromise:

  at i (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/extension.js:11:6399)

  at E.createFileSystem (/Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/extension.js:1:64587)

  at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

Logged at:

  at /Users//.vscode/extensions/kelvin.vscode-sshfs-1.26.1/dist/extension.js:1:66250

  at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

[DEBUG]   [ssh2()] Socket ended

[DEBUG]   [ssh2()] Socket closed `

Immediately after having this fail, we decided to test the previous version which is 1.26.0 and this worked without fail.

Wasca commented 1 year ago

I'm experiencing the same issue. I rolled back to 1.26.0 and it works again.

anselal commented 1 year ago

Same here. Rolled back to 1.26.0 and it works

jazzroutine commented 1 year ago

Same here

alteiis commented 1 year ago

Same here. 1.26.0 rollback and all is fine.

syther05 commented 1 year ago

I can confirm same issue here also. 1.26.0 rollback fixed it

rparmantier commented 1 year ago

Same issue and same rollback to fix the issue

MRVDH commented 1 year ago

Same

wuhelong commented 1 year ago

Same

geesewild commented 1 year ago

Had the same issue with 1.26.1 when using ed25519. It works fine with rsa.

I eventually added "-OPENSSH-SHA1" to sshfs.flags and it worked.

Edit: it also seems to be happening when you have the private key password set. I'm not sure if it is just any encrypted private key or encrypted ed25519 private key.

Wasca commented 1 year ago

I can confirm that adding this value to the settings.json file worked.

"sshfs.flags": [
    "-OPENSSH-SHA1"
  ]
mistune commented 1 year ago

I can confirm that adding this value to the settings.json file worked.

"sshfs.flags": [
    "-OPENSSH-SHA1"
  ]

Thanks @Wasca this fixed it for me.