Skip to content

Net::SSH::Exception padding error #128

Description

@shapkin

I'm trying to connect to sFTP server:

Net::SFTP.start("SERVER_IP", "username", password: "password", non_interactive: true, verify_host_key: :never, verbose: :debug)

This generate the following error

Traceback (most recent call last):
        2: from (irb):7
        1: from (irb):8:in `rescue in irb_binding'
Net::SSH::Exception (padding error, need 1014469068 block 16)

Full traceback:

D, [2021-09-07T10:06:21.430019 #1064] DEBUG -- net.ssh.transport.session[10a2c]: establishing connection to SERVER_IP:22
D, [2021-09-07T10:06:21.497865 #1064] DEBUG -- net.ssh.transport.session[10a2c]: connection established
I, [2021-09-07T10:06:21.498017 #1064]  INFO -- net.ssh.transport.server_version[10a40]: negotiating protocol version
D, [2021-09-07T10:06:21.498123 #1064] DEBUG -- net.ssh.transport.server_version[10a40]: local is `SSH-2.0-Ruby/Net::SSH_6.1.0 x86_64-darwin20'
D, [2021-09-07T10:06:21.577049 #1064] DEBUG -- net.ssh.transport.server_version[10a40]: remote is `SSH-2.0-1.82_sshlib Globalscape'
I, [2021-09-07T10:06:21.577432 #1064]  INFO -- net.ssh.transport.algorithms[10a54]: sending KEXINIT
D, [2021-09-07T10:06:21.577613 #1064] DEBUG -- socket[10a68]: queueing packet nr 0 type 20 len 796
D, [2021-09-07T10:06:21.577711 #1064] DEBUG -- socket[10a68]: sent 800 bytes
D, [2021-09-07T10:06:21.645464 #1064] DEBUG -- socket[10a68]: read 320 bytes
D, [2021-09-07T10:06:21.645614 #1064] DEBUG -- socket[10a68]: received packet nr 0 type 20 len 316
I, [2021-09-07T10:06:21.645725 #1064]  INFO -- net.ssh.transport.algorithms[10a54]: got KEXINIT from server
I, [2021-09-07T10:06:21.645811 #1064]  INFO -- net.ssh.transport.algorithms[10a54]: negotiating algorithms
D, [2021-09-07T10:06:21.646099 #1064] DEBUG -- net.ssh.transport.algorithms[10a54]: negotiated:
* kex: diffie-hellman-group-exchange-sha256
* host_key: ssh-rsa
* encryption_server: aes256-ctr
* encryption_client: aes256-ctr
* hmac_client: hmac-sha2-512
* hmac_server: hmac-sha2-512
* compression_client: none
* compression_server: none
* language_client: 
* language_server: 
D, [2021-09-07T10:06:21.646160 #1064] DEBUG -- net.ssh.transport.algorithms[10a54]: exchanging keys
D, [2021-09-07T10:06:21.646321 #1064] DEBUG -- socket[10a68]: queueing packet nr 1 type 34 len 20
D, [2021-09-07T10:06:21.646403 #1064] DEBUG -- socket[10a68]: sent 24 bytes
D, [2021-09-07T10:06:21.753629 #1064] DEBUG -- socket[10a68]: read 280 bytes
D, [2021-09-07T10:06:21.753795 #1064] DEBUG -- socket[10a68]: received packet nr 1 type 31 len 276
D, [2021-09-07T10:06:21.759496 #1064] DEBUG -- socket[10a68]: queueing packet nr 2 type 32 len 268
D, [2021-09-07T10:06:21.759625 #1064] DEBUG -- socket[10a68]: sent 272 bytes
D, [2021-09-07T10:06:21.840618 #1064] DEBUG -- socket[10a68]: read 848 bytes
D, [2021-09-07T10:06:21.840866 #1064] DEBUG -- socket[10a68]: received packet nr 2 type 33 len 828
D, [2021-09-07T10:06:21.843114 #1064] DEBUG -- socket[10a68]: queueing packet nr 3 type 21 len 20
D, [2021-09-07T10:06:21.843202 #1064] DEBUG -- socket[10a68]: sent 24 bytes
D, [2021-09-07T10:06:21.843270 #1064] DEBUG -- socket[10a68]: received packet nr 3 type 21 len 12
D, [2021-09-07T10:06:21.843504 #1064] DEBUG -- net.ssh.authentication.session[10a7c]: beginning authentication of `username'
D, [2021-09-07T10:06:21.843647 #1064] DEBUG -- socket[10a68]: queueing packet nr 4 type 5 len 28
D, [2021-09-07T10:06:21.843727 #1064] DEBUG -- socket[10a68]: sent 96 bytes
D, [2021-09-07T10:06:22.019387 #1064] DEBUG -- socket[10a68]: read 160 bytes
Traceback (most recent call last):
        2: from (irb):7
        1: from (irb):8:in `rescue in irb_binding'
Net::SSH::Exception (padding error, need 1014469068 block 16)

System configuration
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin20]
net-ssh 6.1.0
net-sftp 3.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions