joelspadin / vscode-remote-x11

Visual Studio Code extension that sets the DISPLAY environment variable in remote workspaces
39 stars 9 forks source link

Support two-factor authentication #17

Open XUKEREN opened 4 years ago

XUKEREN commented 4 years ago

I keep seeing these error messages using either a private key or an agent. Wasn't sure where I did wrong. Any advice would be much appreciated!!

I am connecting SSH remote host with two factor authentication and password authentication.

Remote X11 Output: Setting up display for remote "ssh-remote". Connecting to SSH. See Remote X11 (SSH) logs for more details. Error: All configured authentication methods failed

Remote X11 (SSH) Output: DEBUG: Outgoing: Writing USERAUTH_REQUEST (publickey) DEBUG: Parser: IN_PACKET DEBUG: Parser: Decrypting DEBUG: Parser: pktLen:44,padLen:8,remainLen:32 DEBUG: Parser: IN_PACKETDATA DEBUG: Parser: Decrypting DEBUG: Parser: HMAC size:32 DEBUG: Parser: IN_PACKETDATAVERIFY DEBUG: Parser: Verifying MAC DEBUG: Parser: IN_PACKETDATAVERIFY (Valid HMAC) DEBUG: Parser: IN_PACKETDATAAFTER, packet: USERAUTH_FAILURE DEBUG: Client: Agent key #1 failed DEBUG: Agent: No more keys left to try DEBUG: Client: agent auth failed DEBUG: Outgoing: Writing DISCONNECT (BY_APPLICATION) Error: All configured authentication methods failed

joelspadin commented 4 years ago

I don't think I currently support two-factor authentication. I'd need to handle the authentication key prompt.

For my own reference, https://github.com/mscdex/ssh2/issues/175 has some examples for handling the prompt.