liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.51k stars 265 forks source link

Unexpected packet before version #658

Open spndo opened 5 years ago

spndo commented 5 years ago

I have read all the issues with "Unexpected packet before version" but the solution of changing paths did not fix my problem. In my debug output, it also shows "Client: none auth failed". I read all other problems and add "interactiveAuth": true. Now, I still have "Unexpected packet before version" error with "Client: none auth failed". I wonder does a specific version of ssh matter in this case? It will be really nice if you can give some new ways to think about the problem. Thank you!

Here is the debug output:

[09-25 11:04:49] [debug] Local ident: 'SSH-2.0-ssh2js0.4.2' [09-25 11:04:49] [debug] Client: Trying test on port 22 ... [09-25 11:04:49] [debug] Client: Connected [09-25 11:04:49] [debug] Remote ident: 'SSH-1.99-OpenSSH_4.2' [09-25 11:04:49] [debug] Outgoing: Writing KEXINIT [09-25 11:04:49] [debug] DEBUG: Comparing KEXINITs ... [09-25 11:04:49] [debug] (local) KEX algorithms: ecdh-sha2-nist2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 [09-25 11:04:49] [debug] (remote) KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [09-25 11:04:49] [debug] KEX algorithm: diffie-hellman-group14-sha1 [09-25 11:04:49] [debug] (local) Host key formats: ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521 [09-25 11:04:49] [debug] (remote) Host key formats: ssh-rsa,ssh-dss [09-25 11:04:49] [debug] Host key format: ssh-rsa [09-25 11:04:49] [debug] (local) Client->Server ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com [09-25 11:04:49] [debug] (remote) Client->Server ciphers: aes128-cbc,3des-cb-cbc,arcfour128,,aes128-ctr,aes192-ctr,aes256-ctr [09-25 11:04:49] [debug] Client->Server Cipher: aes128-ctr [09-25 11:04:49] [debug] (local) Server->Client ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com [09-25 11:04:49] [debug] (remote) Server->Client ciphers: aes128-cbc,3des-cbc,blowfish-cbc,cast128,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr [09-25 11:04:49] [debug] Server->Client Cipher: aes128-ctr [09-25 11:04:49] [debug] (local) Client->Server HMAC algorithms: hmac-sha2-256,hmac-sha2-512,hmac-sha1 [09-25 11:04:49] [debug] (remote) Client->Server HMAC algorithms: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [09-25 11:04:49] [debug] Client->Server HMAC algorithm: hmac-sha1 [09-25 11:04:49] [debug] (local) Server->Client HMAC algorithms: hmac-sha2-256,hmac-sha2-512,hmac-sha1 [09-25 11:04:49] [debug] (remote) Server->Client HMAC algorithms: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [09-25 11:04:49] [debug] Server->Client HMAC algorithm: hmac-sha1 [09-25 11:04:49] [debug] (local) Client->Server compression algorithms: none,zlib@openssh.com,zlib [09-25 11:04:49] [debug] (remote) Client->Server compression algorithms: none,zlib@openssh.com [09-25 11:04:49] [debug] Client->Server compression algorithm: none [09-25 11:04:49] [debug] (local) Server->Client compression algorithms: none,zlib@openssh.com,zlib [09-25 11:04:49] [debug] (remote) Server->Client compression algorithms: none,zlib@openssh.com [09-25 11:04:49] [debug] Server->Client compression algorithm: none [09-25 11:04:49] [debug] Outgoing: Writing KEXDH_INIT [09-25 11:04:49] [debug] DEBUG: Checking host key format [09-25 11:04:49] [debug] DEBUG: Checking signature format [09-25 11:04:49] [debug] DEBUG: Verifying host fingerprint [09-25 11:04:49] [debug] DEBUG: Host accepted by default (no verification) [09-25 11:04:49] [debug] DEBUG: Verifying signature [09-25 11:04:49] [debug] Outgoing: Writing NEWKEYS [09-25 11:04:49] [debug] Outgoing: Writing SERVICE_REQUEST (ssh-userauth) [09-25 11:04:49] [debug] Outgoing: Writing USERAUTH_REQUEST (none) [09-25 11:04:49] [debug] Client: none auth failed [09-25 11:04:49] [debug] Outgoing: Writing USERAUTH_REQUEST (password) [09-25 11:04:49] [debug] Outgoing: Writing CHANNEL_OPEN (0, session) [09-25 11:04:49] [debug] Outgoing: Writing CHANNEL_REQUEST (0, subsystem: sftp) [09-25 11:04:49] [debug] Outgoing: Writing CHANNEL_DATA (0) [09-25 11:04:49] [debug] Outgoing: Writing DISCONNECT (BY_APPLICATION) [09-25 11:04:49] [debug] Outgoing: Writing DISCONNECT (BY_APPLICATION) [09-25 11:04:49] [debug] Outgoing: Writing CHANNEL_EOF (0) [09-25 11:04:49] [debug] Outgoing: Writing CHANNEL_CLOSE (0)

yuzhe630 commented 5 years ago

same issue for me

liximomo commented 5 years ago

202

oxomoxo commented 4 years ago

I have found out that modifying tabs size (ieg: tabs 4) in .bashrc (possilbly elsewhere) breaks vscode-sftp with the infamous "Unexpected packet before version" error message ... You may want to check if such a setting is present in your config files while waiting for the author implements a more sensible whitespace management.

DP0150 commented 4 years ago

I just renamed .bashrc to other name.

oxomoxo commented 4 years ago

Except I need my .bashrc AND would enjoy my bash tabs not being displayed as 8 ( ! ) spaces .. ;D

chenwei182729 commented 4 years ago

check is server allow connect