Closed sakurarain99 closed 3 years ago
What causes this? Is there any solution?
This issue would be easier to solve with debug logs, so please follow these steps:
DEBUG_SSH2
to the sshfs.flags
array in VS Code's User Settings (settings.json)
e.g. "sshfs.flags": ["DEBUG_SSH2"]
Output > SSH FS
and copy the log from there after replicating your bugDEBUG_SSH2
activates some internal logging, which is less likely to be censored)_At first glance, it looks like you're trying to use a password, but also specified agent
. When an agent is specified and available, the extension will try to (only) use that agent, even if it fails. That's currently a limitation of the underlying ssh2
library, but might get resolved in the future.
Where is output > SSH FS
?
VS Code has an Output
view/pane, by default accessible with Ctrl + Shift + U
:
After you opened that view, use the dropdown to select
SSH FS
.
extension needs to be already activated, but just viewing the SSH FS
sidebar pane will already activate it
[DEBUG] [ssh2(dianli)] DEBUG: Parser: HMAC size:32
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAVERIFY
[DEBUG] [ssh2(dianli)] DEBUG: Parser: Verifying MAC
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAAFTER, packet: USERAUTH_FAILURE
[DEBUG] [ssh2(dianli)] DEBUG: Client: none auth failed
[DEBUG] [ssh2(dianli)] DEBUG: Outgoing: Writing USERAUTH_REQUEST (password)
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKET
[DEBUG] [ssh2(dianli)] DEBUG: Parser: Decrypting
[DEBUG] [ssh2(dianli)] DEBUG: Parser: pktLen:60,padLen:6,remainLen:48
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATA
[DEBUG] [ssh2(dianli)] DEBUG: Parser: Decrypting
[DEBUG] [ssh2(dianli)] DEBUG: Parser: HMAC size:32
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAVERIFY
[DEBUG] [ssh2(dianli)] DEBUG: Parser: Verifying MAC
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAAFTER, packet: USERAUTH_FAILURE
[DEBUG] [ssh2(dianli)] DEBUG: Client: password auth failed
[DEBUG] [ssh2(dianli)] DEBUG: Outgoing: Writing USERAUTH_REQUEST (keyboard-interactive)
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETBEFORE (expecting 16)
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKET
[DEBUG] [ssh2(dianli)] DEBUG: Parser: Decrypting
[DEBUG] [ssh2(dianli)] DEBUG: Parser: pktLen:60,padLen:6,remainLen:48
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATA
[DEBUG] [ssh2(dianli)] DEBUG: Parser: Decrypting
[DEBUG] [ssh2(dianli)] DEBUG: Parser: HMAC size:32
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAVERIFY
[DEBUG] [ssh2(dianli)] DEBUG: Parser: Verifying MAC
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC)
[DEBUG] [ssh2(dianli)] DEBUG: Parser: IN_PACKETDATAAFTER, packet: USERAUTH_FAILURE
[DEBUG] [ssh2(dianli)] DEBUG: Client: keyboard-interactive auth failed
[ERROR] [createSSH(dianli)] All configured authentication methods failed
Logged at:
at T.
The password can be confirmed
According to those logs, it does try to log in with the password, but the server replies with a failure. If you're sure the password is correct, I can only think of a few causes:
You could perhaps take a look at your server's sshd logs (depending on your OS, these might be in some "security logs" or a journal) while potentially even running sshd with LogLevel
set to DEBUG3
or similar. Should you share these logs, be sure to thoroughly go through them, as the debug log levels can start logging some very sensitive information.
Well, thank you
Since you closed the issue, I assume you found the cause and how to fix it?
After installing the SSH FS plug-in, an error occurred. The following is my connection configuration: "sshfs.configs": [ { "name": "power", // "group": "create.power", "host": "xxx.xx.xxx.130", "port": 22, "root": "/", "username": "root", "password": "root123", "agent": "$SSH_AUTH_SOCK" } ],