Natizyskunk / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
373 stars 68 forks source link

sftp connection failed with "SFTP: Inbound: Packet length 1416128883 exceeds max length of 262144" #235

Open reutli opened 1 year ago

reutli commented 1 year ago

Do you read the FAQ?

Describe the bug Trying to connect to the sftp server ends up in an error.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Extension Logs from Startup - required [10-24 10:28:32] [trace] run command 'List' [10-24 10:28:40] [debug] Custom crypto binding not available [10-24 10:28:40] [debug] Local ident: 'SSH-2.0-ssh2js1.11.0' [10-24 10:28:40] [debug] Client: Trying w0178bf0.kasserver.com on port 22 ... [10-24 10:28:40] [debug] Socket connected [10-24 10:28:40] [debug] Remote ident: 'SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5' [10-24 10:28:40] [debug] Outbound: Sending KEXINIT [10-24 10:28:40] [debug] Inbound: Handshake in progress [10-24 10:28:40] [debug] 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 [10-24 10:28:40] [debug] Handshake: (remote) KEX method: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 [10-24 10:28:40] [debug] Handshake: KEX algorithm: curve25519-sha256@libssh.org [10-24 10:28:40] [debug] Handshake: (local) Host key format: ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa [10-24 10:28:40] [debug] Handshake: (remote) Host key format: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [10-24 10:28:40] [debug] Handshake: Host key format: ssh-ed25519 [10-24 10:28:40] [debug] Handshake: (local) C->S cipher: aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr [10-24 10:28:40] [debug] Handshake: (remote) C->S cipher: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [10-24 10:28:40] [debug] Handshake: C->S Cipher: aes128-gcm@openssh.com [10-24 10:28:40] [debug] Handshake: (local) S->C cipher: aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr [10-24 10:28:40] [debug] Handshake: (remote) S->C cipher: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [10-24 10:28:40] [debug] Handshake: S->C cipher: aes128-gcm@openssh.com [10-24 10:28:40] [debug] 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 [10-24 10:28:40] [debug] Handshake: (remote) C->S MAC: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [10-24 10:28:40] [debug] Handshake: C->S MAC: <implicit> [10-24 10:28:40] [debug] 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 [10-24 10:28:40] [debug] Handshake: (remote) S->C MAC: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [10-24 10:28:40] [debug] Handshake: S->C MAC: <implicit> [10-24 10:28:40] [debug] Handshake: (local) C->S compression: none,zlib@openssh.com,zlib [10-24 10:28:40] [debug] Handshake: (remote) C->S compression: none,zlib@openssh.com [10-24 10:28:40] [debug] Handshake: C->S compression: none [10-24 10:28:40] [debug] Handshake: (local) S->C compression: none,zlib@openssh.com,zlib [10-24 10:28:40] [debug] Handshake: (remote) S->C compression: none,zlib@openssh.com [10-24 10:28:40] [debug] Handshake: S->C compression: none [10-24 10:28:40] [debug] Outbound: Sending KEXECDH_INIT [10-24 10:28:40] [debug] Received DH Reply [10-24 10:28:40] [debug] Host accepted by default (no verification) [10-24 10:28:40] [debug] Host accepted (verified) [10-24 10:28:40] [debug] Outbound: Sending NEWKEYS [10-24 10:28:40] [debug] Inbound: NEWKEYS [10-24 10:28:40] [debug] Verifying signature ... [10-24 10:28:40] [debug] Verified signature [10-24 10:28:40] [debug] Handshake completed [10-24 10:28:40] [debug] Outbound: Sending SERVICE_REQUEST (ssh-userauth) [10-24 10:28:40] [debug] Inbound: Received SERVICE_ACCEPT (ssh-userauth) [10-24 10:28:40] [debug] Outbound: Sending USERAUTH_REQUEST (none) [10-24 10:28:40] [debug] Inbound: Received USERAUTH_FAILURE (publickey,password) [10-24 10:28:40] [debug] Client: none auth failed [10-24 10:28:40] [debug] Outbound: Sending USERAUTH_REQUEST (password) [10-24 10:28:41] [debug] Inbound: Received USERAUTH_SUCCESS [10-24 10:28:41] [debug] Outbound: Sending CHANNEL_OPEN (r:0, session) [10-24 10:28:41] [debug] Inbound: GLOBAL_REQUEST (hostkeys-00@openssh.com) [10-24 10:28:41] [debug] Outbound: Sending GLOBAL_REQUEST (hostkeys-prove-00@openssh.com) [10-24 10:28:41] [debug] Inbound: CHANNEL_OPEN_CONFIRMATION (r:0, s:0) [10-24 10:28:41] [debug] Outbound: Sending CHANNEL_REQUEST (r:0, subsystem: sftp) [10-24 10:28:41] [debug] Inbound: REQUEST_SUCCESS [10-24 10:28:41] [debug] Inbound: CHANNEL_WINDOW_ADJUST (r:0, 2097152) [10-24 10:28:41] [debug] Inbound: CHANNEL_SUCCESS (r:0) [10-24 10:28:41] [debug] Outbound: Sending CHANNEL_DATA (r:0, 9) [10-24 10:28:41] [debug] Inbound: CHANNEL_REQUEST (r:0, exit-status: 1) [10-24 10:28:41] [debug] Inbound: CHANNEL_DATA (r:0, 41) [10-24 10:28:41] [debug] SFTP: Inbound: Packet length 1416128883 exceeds max length of 262144 [10-24 10:28:41] [debug] Outbound: Sending DISCONNECT (11) [10-24 10:28:41] [error] Error: Received exit code 1 while establishing SFTP session at SFTP.onExit (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/client.js:1500:23) at SFTP.emit (node:events:526:28) at CHANNEL_REQUEST (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/client.js:611:23) at 98 (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/protocol/handlers.misc.js:1170:16) at Protocol.onPayload (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/protocol/Protocol.js:2025:10) at AESGCMDecipherNative.decrypt (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/protocol/crypto.js:987:26) at Protocol.parsePacket [as _parse] (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/protocol/Protocol.js:1994:25) at Protocol.parse (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/protocol/Protocol.js:293:16) at Socket.<anonymous> (/Users/micha/.vscode/extensions/natizyskunk.sftp-1.15.20/node_modules/ssh2/lib/client.js:713:21) at Socket.emit (node:events:526:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Readable.push (node:internal/streams/readable:228:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) [10-24 10:28:41] [debug] Socket ended [10-24 10:28:41] [debug] Socket closed

3isenHeiM commented 1 year ago

I got this too, running the latest version from a windows host to a Ubuntu SSH server.

ghost commented 1 year ago

Hello! Please help with solving this problem, I also get the same error when connecting via SSH Ubuntu https://disk.yandex.ru/i/IM3a1Ga8_xGxYw

ghost commented 1 year ago

The problem was related to the size of the greeting specified in .bashcr I added to the standard greeting there

#welcom!
if [ -x /usr/games/cowsay -a -x /usr/games/fortune ]; then
    fortune | cowsay -f tux
fi

this increased the packet size on the first connection!

#fortune | cowsay -f tux

solved the problem!