rkitover / net-ssh2

Net::SSH2 perl module using libssh2
http://search.cpan.org/perldoc?Net::SSH2
21 stars 21 forks source link

Unable to send userauth-publickey request after upgrading ssh packages #45

Closed davewood closed 5 years ago

davewood commented 5 years ago

this error appeared after upgrading various ssh related packages on our debian server

/var/log/dpkg.log
2019-03-27 10:59:13 upgrade libssh2-1-dev:amd64 1.4.3-4.1+deb8u1 1.4.3-4.1+deb8u2

updating to v0.70 didnt help. I also tried generating a new key but he same error appears.

Unable to send userauth-publickey request (-7 LIBSSH2_ERROR_SOCKET_SEND) at foo.pl line 20.

$ perl -MNet::SSH2\ 999;
Net::SSH2 version 999 required--this is only version 0.70.
BEGIN failed--compilation aborted.
$ cat /etc/debian_version 
8.11
use 5.018;
use warnings;

use Net::SSH2;

my $ssh = Net::SSH2->new(timeout => 10*1000); # 10 seconds
$ssh->debug(1);

$ssh->connect($ssh_host, $ssh_port)
  or $ssh->die_with_error;

$ssh->auth_publickey( # line number 20
    $ssh_user,
    $ssh_public_key_path,
    $ssh_private_key_path,
) or $ssh->die_with_error;
$ cpanm -f Net::SSH2
--> Working on Net::SSH2
Fetching http://www.cpan.org/authors/id/S/SA/SALVA/Net-SSH2-0.70.tar.gz ... OK
Configuring Net-SSH2-0.70 ... OK
Building and testing Net-SSH2-0.70 ... OK
Successfully reinstalled Net-SSH2-0.70
1 distribution installed
salva commented 5 years ago

Unable to send userauth-publickey request (-7 LIBSSH2_ERROR_SOCKET_SEND) at foo.pl line 20.

Your sample script has 16 lines only!

davewood commented 5 years ago

thats why I added the comment saying which line is #20. I removed host/port variable definitions.

salva commented 5 years ago

That probably means that the remote side is closing the connection because it doesn't like something libssh2 does.

You could try running a sshd server in debug mode and see what it says when you connect to it with libssh2 (for instance, see https://en.wikibooks.org/wiki/OpenSSH/Logging_and_Troubleshooting#Debugging_a_server_configuration).

salva commented 5 years ago

Also, you can recompile libssh2 with debugging support and then activate it in Net::SSH2, and see what comes out.

davewood commented 5 years ago

for the record, connecting with the ssh binary works with the same credentials the script above is using.

davewood commented 5 years ago

remote server says this in /var/log/auth.log

Mar 28 14:28:03 foobar sshd[18007]: Connection closed by 131.xxx.xxx.xxx port 35141 [preauth]
salva commented 5 years ago

Then it is libssh2 closing the socket. Try compiling libssh2 with debugging support as I told you before and see what it says.

rkitover commented 5 years ago

Are these regular RSA keys? Have you tried authenticating with a password to see if it gives the same error?

davewood commented 5 years ago

libssh2 with --enable-debug compiled and $ssh->trace(-1)

[libssh2] 0.006023 Transport: session_startup for socket 3
[libssh2] 0.006054 Transport: Sending Banner: SSH-2.0-libssh2_1.4.3
[libssh2] 0.006075 Socket: Sent 23/23 bytes at 0x7fc5a9d7efbd+0
[libssh2] 0.006083 Socket: Error recving 1 bytes: 11
[libssh2] 0.006086 Failure Event: -37 - Failed getting banner
[libssh2] 0.014410 Socket: Recved 1 bytes banner
[libssh2] 0.014440 Socket: Recved 1 bytes banner
[libssh2] 0.014450 Socket: Recved 1 bytes banner
[libssh2] 0.014458 Socket: Recved 1 bytes banner
[libssh2] 0.014465 Socket: Recved 1 bytes banner
[libssh2] 0.014471 Socket: Recved 1 bytes banner
[libssh2] 0.014476 Socket: Recved 1 bytes banner
[libssh2] 0.014482 Socket: Recved 1 bytes banner
[libssh2] 0.014488 Socket: Recved 1 bytes banner
[libssh2] 0.014499 Socket: Recved 1 bytes banner
[libssh2] 0.014502 Socket: Recved 1 bytes banner
[libssh2] 0.014505 Socket: Recved 1 bytes banner
[libssh2] 0.014507 Socket: Recved 1 bytes banner
[libssh2] 0.014510 Socket: Recved 1 bytes banner
[libssh2] 0.014512 Socket: Recved 1 bytes banner
[libssh2] 0.014515 Socket: Recved 1 bytes banner
[libssh2] 0.014518 Socket: Recved 1 bytes banner
[libssh2] 0.014520 Socket: Recved 1 bytes banner
[libssh2] 0.014523 Socket: Recved 1 bytes banner
[libssh2] 0.014526 Socket: Recved 1 bytes banner
[libssh2] 0.014528 Socket: Recved 1 bytes banner
[libssh2] 0.014531 Socket: Recved 1 bytes banner
[libssh2] 0.014534 Socket: Recved 1 bytes banner
[libssh2] 0.014536 Socket: Recved 1 bytes banner
[libssh2] 0.014539 Socket: Recved 1 bytes banner
[libssh2] 0.014542 Socket: Recved 1 bytes banner
[libssh2] 0.014544 Socket: Recved 1 bytes banner
[libssh2] 0.014547 Socket: Recved 1 bytes banner
[libssh2] 0.014549 Socket: Recved 1 bytes banner
[libssh2] 0.014552 Socket: Recved 1 bytes banner
[libssh2] 0.014555 Socket: Recved 1 bytes banner
[libssh2] 0.014557 Socket: Recved 1 bytes banner
[libssh2] 0.014560 Socket: Recved 1 bytes banner
[libssh2] 0.014563 Socket: Recved 1 bytes banner
[libssh2] 0.014565 Socket: Recved 1 bytes banner
[libssh2] 0.014568 Socket: Recved 1 bytes banner
[libssh2] 0.014570 Socket: Recved 1 bytes banner
[libssh2] 0.014573 Socket: Recved 1 bytes banner
[libssh2] 0.014577 Socket: Recved 1 bytes banner
[libssh2] 0.014580 Transport: Received Banner: SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u6
[libssh2] 0.015100 Key Ex: Sent KEX: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
[libssh2] 0.015105 Key Ex: Sent HOSTKEY: ssh-rsa,ssh-dss
[libssh2] 0.015107 Key Ex: Sent CRYPT_CS: aes128-ctr,aes192-ctr,aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-cbc,aes128-cbc,blowfish-cbc,arcfour128,arcfour,cast128-cbc,3des-cbc
[libssh2] 0.015109 Key Ex: Sent CRYPT_SC: aes128-ctr,aes192-ctr,aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-cbc,aes128-cbc,blowfish-cbc,arcfour128,arcfour,cast128-cbc,3des-cbc
[libssh2] 0.015112 Key Ex: Sent MAC_CS: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,hmac-ripemd160@openssh.com
[libssh2] 0.015114 Key Ex: Sent MAC_SC: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,hmac-ripemd160@openssh.com
[libssh2] 0.015116 Key Ex: Sent COMP_CS: none
[libssh2] 0.015118 Key Ex: Sent COMP_SC: none
[libssh2] 0.015120 Key Ex: Sent LANG_CS: 
[libssh2] 0.015122 Key Ex: Sent LANG_SC: 
=> libssh2_transport_write plain (636 bytes)
0000: 14 97 92 26 5B 74 8B C4  47 97 F0 5E D3 56 9E 9A : ...&[t..G..^.V..
0010: 6D 00 00 00 59 64 69 66  66 69 65 2D 68 65 6C 6C : m...Ydiffie-hell
0020: 6D 61 6E 2D 67 72 6F 75  70 31 34 2D 73 68 61 31 : man-group14-sha1
0030: 2C 64 69 66 66 69 65 2D  68 65 6C 6C 6D 61 6E 2D : ,diffie-hellman-
0040: 67 72 6F 75 70 2D 65 78  63 68 61 6E 67 65 2D 73 : group-exchange-s
0050: 68 61 31 2C 64 69 66 66  69 65 2D 68 65 6C 6C 6D : ha1,diffie-hellm
0060: 61 6E 2D 67 72 6F 75 70  31 2D 73 68 61 31 00 00 : an-group1-sha1..
0070: 00 0F 73 73 68 2D 72 73  61 2C 73 73 68 2D 64 73 : ..ssh-rsa,ssh-ds
0080: 73 00 00 00 92 61 65 73  31 32 38 2D 63 74 72 2C : s....aes128-ctr,
0090: 61 65 73 31 39 32 2D 63  74 72 2C 61 65 73 32 35 : aes192-ctr,aes25
00a0: 36 2D 63 74 72 2C 61 65  73 32 35 36 2D 63 62 63 : 6-ctr,aes256-cbc
00b0: 2C 72 69 6A 6E 64 61 65  6C 2D 63 62 63 40 6C 79 : ,rijndael-cbc@ly
00c0: 73 61 74 6F 72 2E 6C 69  75 2E 73 65 2C 61 65 73 : sator.liu.se,aes
00d0: 31 39 32 2D 63 62 63 2C  61 65 73 31 32 38 2D 63 : 192-cbc,aes128-c
00e0: 62 63 2C 62 6C 6F 77 66  69 73 68 2D 63 62 63 2C : bc,blowfish-cbc,
00f0: 61 72 63 66 6F 75 72 31  32 38 2C 61 72 63 66 6F : arcfour128,arcfo
0100: 75 72 2C 63 61 73 74 31  32 38 2D 63 62 63 2C 33 : ur,cast128-cbc,3
0110: 64 65 73 2D 63 62 63 00  00 00 92 61 65 73 31 32 : des-cbc....aes12
0120: 38 2D 63 74 72 2C 61 65  73 31 39 32 2D 63 74 72 : 8-ctr,aes192-ctr
0130: 2C 61 65 73 32 35 36 2D  63 74 72 2C 61 65 73 32 : ,aes256-ctr,aes2
0140: 35 36 2D 63 62 63 2C 72  69 6A 6E 64 61 65 6C 2D : 56-cbc,rijndael-
0150: 63 62 63 40 6C 79 73 61  74 6F 72 2E 6C 69 75 2E : cbc@lysator.liu.
0160: 73 65 2C 61 65 73 31 39  32 2D 63 62 63 2C 61 65 : se,aes192-cbc,ae
0170: 73 31 32 38 2D 63 62 63  2C 62 6C 6F 77 66 69 73 : s128-cbc,blowfis
0180: 68 2D 63 62 63 2C 61 72  63 66 6F 75 72 31 32 38 : h-cbc,arcfour128
0190: 2C 61 72 63 66 6F 75 72  2C 63 61 73 74 31 32 38 : ,arcfour,cast128
01a0: 2D 63 62 63 2C 33 64 65  73 2D 63 62 63 00 00 00 : -cbc,3des-cbc...
01b0: 55 68 6D 61 63 2D 73 68  61 31 2C 68 6D 61 63 2D : Uhmac-sha1,hmac-
01c0: 73 68 61 31 2D 39 36 2C  68 6D 61 63 2D 6D 64 35 : sha1-96,hmac-md5
01d0: 2C 68 6D 61 63 2D 6D 64  35 2D 39 36 2C 68 6D 61 : ,hmac-md5-96,hma
01e0: 63 2D 72 69 70 65 6D 64  31 36 30 2C 68 6D 61 63 : c-ripemd160,hmac
01f0: 2D 72 69 70 65 6D 64 31  36 30 40 6F 70 65 6E 73 : -ripemd160@opens
0200: 73 68 2E 63 6F 6D 00 00  00 55 68 6D 61 63 2D 73 : sh.com...Uhmac-s
0210: 68 61 31 2C 68 6D 61 63  2D 73 68 61 31 2D 39 36 : ha1,hmac-sha1-96
0220: 2C 68 6D 61 63 2D 6D 64  35 2C 68 6D 61 63 2D 6D : ,hmac-md5,hmac-m
0230: 64 35 2D 39 36 2C 68 6D  61 63 2D 72 69 70 65 6D : d5-96,hmac-ripem
0240: 64 31 36 30 2C 68 6D 61  63 2D 72 69 70 65 6D 64 : d160,hmac-ripemd
0250: 31 36 30 40 6F 70 65 6E  73 73 68 2E 63 6F 6D 00 : 160@openssh.com.
0260: 00 00 04 6E 6F 6E 65 00  00 00 04 6E 6F 6E 65 00 : ...none....none.
0270: 00 00 00 00 00 00 00 00  00 00 00 00             : ............
[libssh2] 0.015253 Socket: Sent 648/648 bytes at 0x1023630
=> libssh2_transport_write send() (648 bytes)
0000: 00 00 02 84 07 14 97 92  26 5B 74 8B C4 47 97 F0 : ........&[t..G..
0010: 5E D3 56 9E 9A 6D 00 00  00 59 64 69 66 66 69 65 : ^.V..m...Ydiffie
0020: 2D 68 65 6C 6C 6D 61 6E  2D 67 72 6F 75 70 31 34 : -hellman-group14
0030: 2D 73 68 61 31 2C 64 69  66 66 69 65 2D 68 65 6C : -sha1,diffie-hel
0040: 6C 6D 61 6E 2D 67 72 6F  75 70 2D 65 78 63 68 61 : lman-group-excha
0050: 6E 67 65 2D 73 68 61 31  2C 64 69 66 66 69 65 2D : nge-sha1,diffie-
0060: 68 65 6C 6C 6D 61 6E 2D  67 72 6F 75 70 31 2D 73 : hellman-group1-s
0070: 68 61 31 00 00 00 0F 73  73 68 2D 72 73 61 2C 73 : ha1....ssh-rsa,s
0080: 73 68 2D 64 73 73 00 00  00 92 61 65 73 31 32 38 : sh-dss....aes128
0090: 2D 63 74 72 2C 61 65 73  31 39 32 2D 63 74 72 2C : -ctr,aes192-ctr,
00a0: 61 65 73 32 35 36 2D 63  74 72 2C 61 65 73 32 35 : aes256-ctr,aes25
00b0: 36 2D 63 62 63 2C 72 69  6A 6E 64 61 65 6C 2D 63 : 6-cbc,rijndael-c
00c0: 62 63 40 6C 79 73 61 74  6F 72 2E 6C 69 75 2E 73 : bc@lysator.liu.s
00d0: 65 2C 61 65 73 31 39 32  2D 63 62 63 2C 61 65 73 : e,aes192-cbc,aes
00e0: 31 32 38 2D 63 62 63 2C  62 6C 6F 77 66 69 73 68 : 128-cbc,blowfish
00f0: 2D 63 62 63 2C 61 72 63  66 6F 75 72 31 32 38 2C : -cbc,arcfour128,
0100: 61 72 63 66 6F 75 72 2C  63 61 73 74 31 32 38 2D : arcfour,cast128-
0110: 63 62 63 2C 33 64 65 73  2D 63 62 63 00 00 00 92 : cbc,3des-cbc....
0120: 61 65 73 31 32 38 2D 63  74 72 2C 61 65 73 31 39 : aes128-ctr,aes19
0130: 32 2D 63 74 72 2C 61 65  73 32 35 36 2D 63 74 72 : 2-ctr,aes256-ctr
0140: 2C 61 65 73 32 35 36 2D  63 62 63 2C 72 69 6A 6E : ,aes256-cbc,rijn
0150: 64 61 65 6C 2D 63 62 63  40 6C 79 73 61 74 6F 72 : dael-cbc@lysator
0160: 2E 6C 69 75 2E 73 65 2C  61 65 73 31 39 32 2D 63 : .liu.se,aes192-c
0170: 62 63 2C 61 65 73 31 32  38 2D 63 62 63 2C 62 6C : bc,aes128-cbc,bl
0180: 6F 77 66 69 73 68 2D 63  62 63 2C 61 72 63 66 6F : owfish-cbc,arcfo
0190: 75 72 31 32 38 2C 61 72  63 66 6F 75 72 2C 63 61 : ur128,arcfour,ca
01a0: 73 74 31 32 38 2D 63 62  63 2C 33 64 65 73 2D 63 : st128-cbc,3des-c
01b0: 62 63 00 00 00 55 68 6D  61 63 2D 73 68 61 31 2C : bc...Uhmac-sha1,
01c0: 68 6D 61 63 2D 73 68 61  31 2D 39 36 2C 68 6D 61 : hmac-sha1-96,hma
01d0: 63 2D 6D 64 35 2C 68 6D  61 63 2D 6D 64 35 2D 39 : c-md5,hmac-md5-9
01e0: 36 2C 68 6D 61 63 2D 72  69 70 65 6D 64 31 36 30 : 6,hmac-ripemd160
01f0: 2C 68 6D 61 63 2D 72 69  70 65 6D 64 31 36 30 40 : ,hmac-ripemd160@
0200: 6F 70 65 6E 73 73 68 2E  63 6F 6D 00 00 00 55 68 : openssh.com...Uh
0210: 6D 61 63 2D 73 68 61 31  2C 68 6D 61 63 2D 73 68 : mac-sha1,hmac-sh
0220: 61 31 2D 39 36 2C 68 6D  61 63 2D 6D 64 35 2C 68 : a1-96,hmac-md5,h
0230: 6D 61 63 2D 6D 64 35 2D  39 36 2C 68 6D 61 63 2D : mac-md5-96,hmac-
0240: 72 69 70 65 6D 64 31 36  30 2C 68 6D 61 63 2D 72 : ripemd160,hmac-r
0250: 69 70 65 6D 64 31 36 30  40 6F 70 65 6E 73 73 68 : ipemd160@openssh
0260: 2E 63 6F 6D 00 00 00 04  6E 6F 6E 65 00 00 00 04 : .com....none....
0270: 6E 6F 6E 65 00 00 00 00  00 00 00 00 00 00 00 00 : none............
0280: 00 3A E6 08 2C 6D 9B 58                          : .:..,m.X
[libssh2] 0.015333 Transport: Looking for packet of type: 20
[libssh2] 0.015338 Socket: Recved 1080/16384 bytes to 0x101f5f0+0
=> libssh2_transport_read() raw (1080 bytes)
0000: 00 00 04 34 06 14 16 AF  69 72 6E 03 0A 3D 43 9A : ...4....irn..=C.
0010: E0 56 8A 67 B2 AA 00 00  01 02 63 75 72 76 65 32 : .V.g......curve2
0020: 35 35 31 39 2D 73 68 61  32 35 36 2C 63 75 72 76 : 5519-sha256,curv
0030: 65 32 35 35 31 39 2D 73  68 61 32 35 36 40 6C 69 : e25519-sha256@li
0040: 62 73 73 68 2E 6F 72 67  2C 65 63 64 68 2D 73 68 : bssh.org,ecdh-sh
0050: 61 32 2D 6E 69 73 74 70  32 35 36 2C 65 63 64 68 : a2-nistp256,ecdh
0060: 2D 73 68 61 32 2D 6E 69  73 74 70 33 38 34 2C 65 : -sha2-nistp384,e
0070: 63 64 68 2D 73 68 61 32  2D 6E 69 73 74 70 35 32 : cdh-sha2-nistp52
0080: 31 2C 64 69 66 66 69 65  2D 68 65 6C 6C 6D 61 6E : 1,diffie-hellman
0090: 2D 67 72 6F 75 70 2D 65  78 63 68 61 6E 67 65 2D : -group-exchange-
00a0: 73 68 61 32 35 36 2C 64  69 66 66 69 65 2D 68 65 : sha256,diffie-he
00b0: 6C 6C 6D 61 6E 2D 67 72  6F 75 70 31 36 2D 73 68 : llman-group16-sh
00c0: 61 35 31 32 2C 64 69 66  66 69 65 2D 68 65 6C 6C : a512,diffie-hell
00d0: 6D 61 6E 2D 67 72 6F 75  70 31 38 2D 73 68 61 35 : man-group18-sha5
00e0: 31 32 2C 64 69 66 66 69  65 2D 68 65 6C 6C 6D 61 : 12,diffie-hellma
00f0: 6E 2D 67 72 6F 75 70 31  34 2D 73 68 61 32 35 36 : n-group14-sha256
0100: 2C 64 69 66 66 69 65 2D  68 65 6C 6C 6D 61 6E 2D : ,diffie-hellman-
0110: 67 72 6F 75 70 31 34 2D  73 68 61 31 00 00 00 41 : group14-sha1...A
0120: 73 73 68 2D 72 73 61 2C  72 73 61 2D 73 68 61 32 : ssh-rsa,rsa-sha2
0130: 2D 35 31 32 2C 72 73 61  2D 73 68 61 32 2D 32 35 : -512,rsa-sha2-25
0140: 36 2C 65 63 64 73 61 2D  73 68 61 32 2D 6E 69 73 : 6,ecdsa-sha2-nis
0150: 74 70 32 35 36 2C 73 73  68 2D 65 64 32 35 35 31 : tp256,ssh-ed2551
0160: 39 00 00 00 6C 63 68 61  63 68 61 32 30 2D 70 6F : 9...lchacha20-po
0170: 6C 79 31 33 30 35 40 6F  70 65 6E 73 73 68 2E 63 : ly1305@openssh.c
0180: 6F 6D 2C 61 65 73 31 32  38 2D 63 74 72 2C 61 65 : om,aes128-ctr,ae
0190: 73 31 39 32 2D 63 74 72  2C 61 65 73 32 35 36 2D : s192-ctr,aes256-
01a0: 63 74 72 2C 61 65 73 31  32 38 2D 67 63 6D 40 6F : ctr,aes128-gcm@o
01b0: 70 65 6E 73 73 68 2E 63  6F 6D 2C 61 65 73 32 35 : penssh.com,aes25
01c0: 36 2D 67 63 6D 40 6F 70  65 6E 73 73 68 2E 63 6F : 6-gcm@openssh.co
01d0: 6D 00 00 00 6C 63 68 61  63 68 61 32 30 2D 70 6F : m...lchacha20-po
01e0: 6C 79 31 33 30 35 40 6F  70 65 6E 73 73 68 2E 63 : ly1305@openssh.c
01f0: 6F 6D 2C 61 65 73 31 32  38 2D 63 74 72 2C 61 65 : om,aes128-ctr,ae
0200: 73 31 39 32 2D 63 74 72  2C 61 65 73 32 35 36 2D : s192-ctr,aes256-
0210: 63 74 72 2C 61 65 73 31  32 38 2D 67 63 6D 40 6F : ctr,aes128-gcm@o
0220: 70 65 6E 73 73 68 2E 63  6F 6D 2C 61 65 73 32 35 : penssh.com,aes25
0230: 36 2D 67 63 6D 40 6F 70  65 6E 73 73 68 2E 63 6F : 6-gcm@openssh.co
0240: 6D 00 00 00 D5 75 6D 61  63 2D 36 34 2D 65 74 6D : m....umac-64-etm
0250: 40 6F 70 65 6E 73 73 68  2E 63 6F 6D 2C 75 6D 61 : @openssh.com,uma
0260: 63 2D 31 32 38 2D 65 74  6D 40 6F 70 65 6E 73 73 : c-128-etm@openss
0270: 68 2E 63 6F 6D 2C 68 6D  61 63 2D 73 68 61 32 2D : h.com,hmac-sha2-
0280: 32 35 36 2D 65 74 6D 40  6F 70 65 6E 73 73 68 2E : 256-etm@openssh.
0290: 63 6F 6D 2C 68 6D 61 63  2D 73 68 61 32 2D 35 31 : com,hmac-sha2-51
02a0: 32 2D 65 74 6D 40 6F 70  65 6E 73 73 68 2E 63 6F : 2-etm@openssh.co
02b0: 6D 2C 68 6D 61 63 2D 73  68 61 31 2D 65 74 6D 40 : m,hmac-sha1-etm@
02c0: 6F 70 65 6E 73 73 68 2E  63 6F 6D 2C 75 6D 61 63 : openssh.com,umac
02d0: 2D 36 34 40 6F 70 65 6E  73 73 68 2E 63 6F 6D 2C : -64@openssh.com,
02e0: 75 6D 61 63 2D 31 32 38  40 6F 70 65 6E 73 73 68 : umac-128@openssh
02f0: 2E 63 6F 6D 2C 68 6D 61  63 2D 73 68 61 32 2D 32 : .com,hmac-sha2-2
0300: 35 36 2C 68 6D 61 63 2D  73 68 61 32 2D 35 31 32 : 56,hmac-sha2-512
0310: 2C 68 6D 61 63 2D 73 68  61 31 00 00 00 D5 75 6D : ,hmac-sha1....um
0320: 61 63 2D 36 34 2D 65 74  6D 40 6F 70 65 6E 73 73 : ac-64-etm@openss
0330: 68 2E 63 6F 6D 2C 75 6D  61 63 2D 31 32 38 2D 65 : h.com,umac-128-e
0340: 74 6D 40 6F 70 65 6E 73  73 68 2E 63 6F 6D 2C 68 : tm@openssh.com,h
0350: 6D 61 63 2D 73 68 61 32  2D 32 35 36 2D 65 74 6D : mac-sha2-256-etm
0360: 40 6F 70 65 6E 73 73 68  2E 63 6F 6D 2C 68 6D 61 : @openssh.com,hma
0370: 63 2D 73 68 61 32 2D 35  31 32 2D 65 74 6D 40 6F : c-sha2-512-etm@o
0380: 70 65 6E 73 73 68 2E 63  6F 6D 2C 68 6D 61 63 2D : penssh.com,hmac-
0390: 73 68 61 31 2D 65 74 6D  40 6F 70 65 6E 73 73 68 : sha1-etm@openssh
03a0: 2E 63 6F 6D 2C 75 6D 61  63 2D 36 34 40 6F 70 65 : .com,umac-64@ope
03b0: 6E 73 73 68 2E 63 6F 6D  2C 75 6D 61 63 2D 31 32 : nssh.com,umac-12
03c0: 38 40 6F 70 65 6E 73 73  68 2E 63 6F 6D 2C 68 6D : 8@openssh.com,hm
03d0: 61 63 2D 73 68 61 32 2D  32 35 36 2C 68 6D 61 63 : ac-sha2-256,hmac
03e0: 2D 73 68 61 32 2D 35 31  32 2C 68 6D 61 63 2D 73 : -sha2-512,hmac-s
03f0: 68 61 31 00 00 00 15 6E  6F 6E 65 2C 7A 6C 69 62 : ha1....none,zlib
0400: 40 6F 70 65 6E 73 73 68  2E 63 6F 6D 00 00 00 15 : @openssh.com....
0410: 6E 6F 6E 65 2C 7A 6C 69  62 40 6F 70 65 6E 73 73 : none,zlib@openss
0420: 68 2E 63 6F 6D 00 00 00  00 00 00 00 00 00 00 00 : h.com...........
0430: 00 00 00 00 00 00 00 00                          : ........
=> libssh2_transport_read() plain (1069 bytes)
0000: 14 16 AF 69 72 6E 03 0A  3D 43 9A E0 56 8A 67 B2 : ...irn..=C..V.g.
0010: AA 00 00 01 02 63 75 72  76 65 32 35 35 31 39 2D : .....curve25519-
0020: 73 68 61 32 35 36 2C 63  75 72 76 65 32 35 35 31 : sha256,curve2551
0030: 39 2D 73 68 61 32 35 36  40 6C 69 62 73 73 68 2E : 9-sha256@libssh.
0040: 6F 72 67 2C 65 63 64 68  2D 73 68 61 32 2D 6E 69 : org,ecdh-sha2-ni
0050: 73 74 70 32 35 36 2C 65  63 64 68 2D 73 68 61 32 : stp256,ecdh-sha2
0060: 2D 6E 69 73 74 70 33 38  34 2C 65 63 64 68 2D 73 : -nistp384,ecdh-s
0070: 68 61 32 2D 6E 69 73 74  70 35 32 31 2C 64 69 66 : ha2-nistp521,dif
0080: 66 69 65 2D 68 65 6C 6C  6D 61 6E 2D 67 72 6F 75 : fie-hellman-grou
0090: 70 2D 65 78 63 68 61 6E  67 65 2D 73 68 61 32 35 : p-exchange-sha25
00a0: 36 2C 64 69 66 66 69 65  2D 68 65 6C 6C 6D 61 6E : 6,diffie-hellman
00b0: 2D 67 72 6F 75 70 31 36  2D 73 68 61 35 31 32 2C : -group16-sha512,
00c0: 64 69 66 66 69 65 2D 68  65 6C 6C 6D 61 6E 2D 67 : diffie-hellman-g
00d0: 72 6F 75 70 31 38 2D 73  68 61 35 31 32 2C 64 69 : roup18-sha512,di
00e0: 66 66 69 65 2D 68 65 6C  6C 6D 61 6E 2D 67 72 6F : ffie-hellman-gro
00f0: 75 70 31 34 2D 73 68 61  32 35 36 2C 64 69 66 66 : up14-sha256,diff
0100: 69 65 2D 68 65 6C 6C 6D  61 6E 2D 67 72 6F 75 70 : ie-hellman-group
0110: 31 34 2D 73 68 61 31 00  00 00 41 73 73 68 2D 72 : 14-sha1...Assh-r
0120: 73 61 2C 72 73 61 2D 73  68 61 32 2D 35 31 32 2C : sa,rsa-sha2-512,
0130: 72 73 61 2D 73 68 61 32  2D 32 35 36 2C 65 63 64 : rsa-sha2-256,ecd
0140: 73 61 2D 73 68 61 32 2D  6E 69 73 74 70 32 35 36 : sa-sha2-nistp256
0150: 2C 73 73 68 2D 65 64 32  35 35 31 39 00 00 00 6C : ,ssh-ed25519...l
0160: 63 68 61 63 68 61 32 30  2D 70 6F 6C 79 31 33 30 : chacha20-poly130
0170: 35 40 6F 70 65 6E 73 73  68 2E 63 6F 6D 2C 61 65 : 5@openssh.com,ae
0180: 73 31 32 38 2D 63 74 72  2C 61 65 73 31 39 32 2D : s128-ctr,aes192-
0190: 63 74 72 2C 61 65 73 32  35 36 2D 63 74 72 2C 61 : ctr,aes256-ctr,a
01a0: 65 73 31 32 38 2D 67 63  6D 40 6F 70 65 6E 73 73 : es128-gcm@openss
01b0: 68 2E 63 6F 6D 2C 61 65  73 32 35 36 2D 67 63 6D : h.com,aes256-gcm
01c0: 40 6F 70 65 6E 73 73 68  2E 63 6F 6D 00 00 00 6C : @openssh.com...l
01d0: 63 68 61 63 68 61 32 30  2D 70 6F 6C 79 31 33 30 : chacha20-poly130
01e0: 35 40 6F 70 65 6E 73 73  68 2E 63 6F 6D 2C 61 65 : 5@openssh.com,ae
01f0: 73 31 32 38 2D 63 74 72  2C 61 65 73 31 39 32 2D : s128-ctr,aes192-
0200: 63 74 72 2C 61 65 73 32  35 36 2D 63 74 72 2C 61 : ctr,aes256-ctr,a
0210: 65 73 31 32 38 2D 67 63  6D 40 6F 70 65 6E 73 73 : es128-gcm@openss
0220: 68 2E 63 6F 6D 2C 61 65  73 32 35 36 2D 67 63 6D : h.com,aes256-gcm
0230: 40 6F 70 65 6E 73 73 68  2E 63 6F 6D 00 00 00 D5 : @openssh.com....
0240: 75 6D 61 63 2D 36 34 2D  65 74 6D 40 6F 70 65 6E : umac-64-etm@open
0250: 73 73 68 2E 63 6F 6D 2C  75 6D 61 63 2D 31 32 38 : ssh.com,umac-128
0260: 2D 65 74 6D 40 6F 70 65  6E 73 73 68 2E 63 6F 6D : -etm@openssh.com
0270: 2C 68 6D 61 63 2D 73 68  61 32 2D 32 35 36 2D 65 : ,hmac-sha2-256-e
0280: 74 6D 40 6F 70 65 6E 73  73 68 2E 63 6F 6D 2C 68 : tm@openssh.com,h
0290: 6D 61 63 2D 73 68 61 32  2D 35 31 32 2D 65 74 6D : mac-sha2-512-etm
02a0: 40 6F 70 65 6E 73 73 68  2E 63 6F 6D 2C 68 6D 61 : @openssh.com,hma
02b0: 63 2D 73 68 61 31 2D 65  74 6D 40 6F 70 65 6E 73 : c-sha1-etm@opens
02c0: 73 68 2E 63 6F 6D 2C 75  6D 61 63 2D 36 34 40 6F : sh.com,umac-64@o
02d0: 70 65 6E 73 73 68 2E 63  6F 6D 2C 75 6D 61 63 2D : penssh.com,umac-
02e0: 31 32 38 40 6F 70 65 6E  73 73 68 2E 63 6F 6D 2C : 128@openssh.com,
02f0: 68 6D 61 63 2D 73 68 61  32 2D 32 35 36 2C 68 6D : hmac-sha2-256,hm
0300: 61 63 2D 73 68 61 32 2D  35 31 32 2C 68 6D 61 63 : ac-sha2-512,hmac
0310: 2D 73 68 61 31 00 00 00  D5 75 6D 61 63 2D 36 34 : -sha1....umac-64
0320: 2D 65 74 6D 40 6F 70 65  6E 73 73 68 2E 63 6F 6D : -etm@openssh.com
0330: 2C 75 6D 61 63 2D 31 32  38 2D 65 74 6D 40 6F 70 : ,umac-128-etm@op
0340: 65 6E 73 73 68 2E 63 6F  6D 2C 68 6D 61 63 2D 73 : enssh.com,hmac-s
0350: 68 61 32 2D 32 35 36 2D  65 74 6D 40 6F 70 65 6E : ha2-256-etm@open
0360: 73 73 68 2E 63 6F 6D 2C  68 6D 61 63 2D 73 68 61 : ssh.com,hmac-sha
0370: 32 2D 35 31 32 2D 65 74  6D 40 6F 70 65 6E 73 73 : 2-512-etm@openss
0380: 68 2E 63 6F 6D 2C 68 6D  61 63 2D 73 68 61 31 2D : h.com,hmac-sha1-
0390: 65 74 6D 40 6F 70 65 6E  73 73 68 2E 63 6F 6D 2C : etm@openssh.com,
03a0: 75 6D 61 63 2D 36 34 40  6F 70 65 6E 73 73 68 2E : umac-64@openssh.
03b0: 63 6F 6D 2C 75 6D 61 63  2D 31 32 38 40 6F 70 65 : com,umac-128@ope
03c0: 6E 73 73 68 2E 63 6F 6D  2C 68 6D 61 63 2D 73 68 : nssh.com,hmac-sh
03d0: 61 32 2D 32 35 36 2C 68  6D 61 63 2D 73 68 61 32 : a2-256,hmac-sha2
03e0: 2D 35 31 32 2C 68 6D 61  63 2D 73 68 61 31 00 00 : -512,hmac-sha1..
03f0: 00 15 6E 6F 6E 65 2C 7A  6C 69 62 40 6F 70 65 6E : ..none,zlib@open
0400: 73 73 68 2E 63 6F 6D 00  00 00 15 6E 6F 6E 65 2C : ssh.com....none,
0410: 7A 6C 69 62 40 6F 70 65  6E 73 73 68 2E 63 6F 6D : zlib@openssh.com
0420: 00 00 00 00 00 00 00 00  00 00 00 00 00          : .............
[libssh2] 0.015573 Transport: Packet type 20 received, length=1069
[libssh2] 0.015576 Transport: Looking for packet of type: 20
[libssh2] 0.015585 Key Ex: Agreed on KEX method: diffie-hellman-group14-sha1
[libssh2] 0.015587 Key Ex: Agreed on HOSTKEY method: ssh-rsa
[libssh2] 0.015589 Key Ex: Agreed on CRYPT_CS method: aes128-ctr
[libssh2] 0.015591 Key Ex: Agreed on CRYPT_SC method: aes128-ctr
[libssh2] 0.015593 Key Ex: Agreed on MAC_CS method: hmac-sha1
[libssh2] 0.015595 Key Ex: Agreed on MAC_SC method: hmac-sha1
[libssh2] 0.015597 Key Ex: Agreed on COMP_CS method: none
[libssh2] 0.015599 Key Ex: Agreed on COMP_SC method: none
[libssh2] 0.015606 Key Ex: Initiating Diffie-Hellman Group14 Key Exchange
[libssh2] 0.026485 Key Ex: Sending KEX packet 30
=> libssh2_transport_write plain (261 bytes)
0000: 1E 00 00 01 00 48 27 54  D5 44 D0 5B B0 43 3F 98 : .....H'T.D.[.C?.
0010: B8 1C C5 79 BE 9B 27 24  48 74 26 03 1B 14 80 9F : ...y..'$Ht&.....
0020: 22 C5 90 F6 EE 00 AA B9  F1 09 45 68 91 45 E9 21 : ".........Eh.E.!
0030: BE D6 95 D0 39 1A B2 4F  B1 AC B3 BE E1 E1 3F 34 : ....9..O......?4
0040: CC 09 A6 18 AA FA FF 9A  5C F9 35 A1 16 40 95 34 : ........\.5..@.4
0050: 34 E5 12 E1 A9 8F 14 D5  5B 5E C1 B3 16 91 6D 22 : 4.......[^....m"
0060: 87 7A D2 57 5F 25 F7 EC  7C 27 12 B8 3B 7B F1 5F : .z.W_%..|'..;{._
0070: 7E C1 18 E3 3E 6F 21 44  CC EA 84 14 E6 ED 24 E7 : ~...>o!D......$.
0080: 68 8F 26 26 64 31 B4 3B  13 6F 6F 52 3D F6 D3 41 : h.&&d1.;.ooR=..A
0090: 9D 2D 91 64 82 64 B8 8B  7C 71 93 85 56 B2 F4 35 : .-.d.d..|q..V..5
00a0: 74 AE DC 26 63 1D 89 13  0D B8 A2 29 91 55 83 2D : t..&c......).U.-
00b0: A9 DA 3F DC 48 84 85 B4  DD 6F E2 31 88 C2 39 01 : ..?.H....o.1..9.
00c0: 8F 84 8B D5 F6 23 4A 3D  44 7B B8 D1 8F 40 FF 28 : .....#J=D{...@.(
00d0: 62 A7 01 83 07 09 A2 48  E8 23 33 34 45 62 B0 7C : b......H.#34Eb.|
00e0: F6 7E 3A AE F9 6E 38 86  AD 5A 97 7F 52 D6 0E 4D : .~:..n8..Z..R..M
00f0: D1 D5 3A F2 3A 4C A3 FC  1E CF 3F EC 96 DF DE E3 : ..:.:L....?.....
0100: 3F A6 D1 B7 2E                                   : ?....
[libssh2] 0.026586 Socket: Sent 272/272 bytes at 0x1023630
=> libssh2_transport_write send() (272 bytes)
0000: 00 00 01 0C 06 1E 00 00  01 00 48 27 54 D5 44 D0 : ..........H'T.D.
0010: 5B B0 43 3F 98 B8 1C C5  79 BE 9B 27 24 48 74 26 : [.C?....y..'$Ht&
0020: 03 1B 14 80 9F 22 C5 90  F6 EE 00 AA B9 F1 09 45 : .....".........E
0030: 68 91 45 E9 21 BE D6 95  D0 39 1A B2 4F B1 AC B3 : h.E.!....9..O...
0040: BE E1 E1 3F 34 CC 09 A6  18 AA FA FF 9A 5C F9 35 : ...?4........\.5
0050: A1 16 40 95 34 34 E5 12  E1 A9 8F 14 D5 5B 5E C1 : ..@.44.......[^.
0060: B3 16 91 6D 22 87 7A D2  57 5F 25 F7 EC 7C 27 12 : ...m".z.W_%..|'.
0070: B8 3B 7B F1 5F 7E C1 18  E3 3E 6F 21 44 CC EA 84 : .;{._~...>o!D...
0080: 14 E6 ED 24 E7 68 8F 26  26 64 31 B4 3B 13 6F 6F : ...$.h.&&d1.;.oo
0090: 52 3D F6 D3 41 9D 2D 91  64 82 64 B8 8B 7C 71 93 : R=..A.-.d.d..|q.
00a0: 85 56 B2 F4 35 74 AE DC  26 63 1D 89 13 0D B8 A2 : .V..5t..&c......
00b0: 29 91 55 83 2D A9 DA 3F  DC 48 84 85 B4 DD 6F E2 : ).U.-..?.H....o.
00c0: 31 88 C2 39 01 8F 84 8B  D5 F6 23 4A 3D 44 7B B8 : 1..9......#J=D{.
00d0: D1 8F 40 FF 28 62 A7 01  83 07 09 A2 48 E8 23 33 : ..@.(b......H.#3
00e0: 34 45 62 B0 7C F6 7E 3A  AE F9 6E 38 86 AD 5A 97 : 4Eb.|.~:..n8..Z.
00f0: 7F 52 D6 0E 4D D1 D5 3A  F2 3A 4C A3 FC 1E CF 3F : .R..M..:.:L....?
0100: EC 96 DF DE E3 3F A6 D1  B7 2E B7 73 EB CA C5 5C : .....?.....s...\
[libssh2] 0.026632 Transport: Looking for packet of type: 31
[libssh2] 0.026637 Failure Event: -37 - Unable to exchange encryption keys
[libssh2] 0.061418 Socket: Recved 848/16384 bytes to 0x101f5f0+0
=> libssh2_transport_read() raw (848 bytes)
0000: 00 00 03 3C 08 1F 00 00  01 17 00 00 00 07 73 73 : ...<..........ss
0010: 68 2D 72 73 61 00 00 00  03 01 00 01 00 00 01 01 : h-rsa...........
0020: 00 CA 33 C1 50 CB C3 7E  8C C9 A8 4C 7E BE 68 D8 : ..3.P..~...L~.h.
0030: 3E 92 63 0D 73 23 F3 CE  48 DA 30 BB 39 3F 72 C8 : >.c.s#..H.0.9?r.
0040: B6 D8 05 3F F6 FE F8 7B  54 F3 9C 14 69 B1 29 C5 : ...?...{T...i.).
0050: 2C B2 21 36 19 96 72 16  85 2E 87 0B EB D6 94 4E : ,.!6..r........N
0060: 21 94 92 87 20 11 46 B0  9C 7D 0E 3A D6 8D 49 D1 : !... .F..}.:..I.
0070: C3 AF 46 A2 A0 6D CA 83  31 3D F2 10 42 A3 59 C1 : ..F..m..1=..B.Y.
0080: 68 27 C4 45 CE 16 59 0B  94 96 3D 45 56 9D 9F 36 : h'.E..Y...=EV..6
0090: 4C AF A6 53 02 AE 75 9E  D7 2D 75 71 87 A0 C2 52 : L..S..u..-uq...R
00a0: 1B DD 89 2F D5 AD 4E E8  AA B0 19 37 BE 2B 61 CE : .../..N....7.+a.
00b0: 70 C7 CD 02 8E 6A D1 5C  B1 92 E0 0C 6F E9 2A 0A : p....j.\....o.*.
00c0: 78 22 CC 80 72 EE 3D 05  F6 B0 33 2D 0F B6 DF F5 : x"..r.=...3-....
00d0: 1C ED 03 5C FD 68 73 BE  84 F1 9F 44 F7 E5 51 7E : ...\.hs....D..Q~
00e0: FC 76 9F F2 B3 33 1C 82  0E AC B0 F3 42 85 20 6A : .v...3......B. j
00f0: 40 B7 34 11 B7 E2 97 0B  F9 59 E2 D8 DC 4D 55 57 : @.4......Y...MUW
0100: 17 C4 F7 4C E4 68 84 99  B2 BC DA 54 C6 08 09 17 : ...L.h.....T....
0110: 8A F2 CA 9D 7D 95 6B 05  C6 7E 22 6B 4F 4D 59 50 : ....}.k..~"kOMYP
0120: C5 00 00 01 00 7D E5 D1  F5 94 18 04 0A 97 67 A9 : .....}........g.
0130: A5 EF 01 5B 1C C9 31 85  E1 3A 47 10 8F 1C 14 CD : ...[..1..:G.....
0140: 35 31 34 2D D8 0E 5D 31  85 EB D1 6A F7 A2 B8 E5 : 514-..]1...j....
0150: 42 D5 27 9C C2 99 54 73  10 4A 53 B8 87 77 31 9C : B.'...Ts.JS..w1.
0160: 5D B5 66 7E E5 0F F3 CB  AA B8 B4 F0 33 87 57 89 : ].f~........3.W.
0170: 0E 24 03 9B 5F A8 31 5C  AC 41 30 E4 36 05 0F 90 : .$.._.1\.A0.6...
0180: 6F A7 6C E7 3B 81 1E C0  7D 71 F0 90 5E 36 73 53 : o.l.;...}q..^6sS
0190: B0 E8 21 AC 47 C9 D1 0E  C3 AF 9E 2C 59 C1 89 73 : ..!.G......,Y..s
01a0: E7 20 7D 6A 64 5F E7 B1  BA FE 31 47 9E 0E 7A C7 : . }jd_....1G..z.
01b0: 13 DB 98 64 FD 29 EB 3D  35 43 CB 7B 70 C4 91 80 : ...d.).=5C.{p...
01c0: 19 68 45 37 E2 37 A1 A4  9C 20 91 7F 1F CD DF 98 : .hE7.7... ......
01d0: 02 AD 84 97 11 40 A1 BB  13 46 A9 EB D7 25 B1 9C : .....@...F...%..
01e0: 4A 11 69 74 F7 F3 D7 E1  8B 03 2C A6 23 BF 43 9C : J.it......,.#.C.
01f0: D1 86 55 3C A8 A1 8D 45  21 A2 9B 9A B2 05 64 80 : ..U<...E!.....d.
0200: 9D BE 28 31 37 B7 89 29  8B 9B 73 CE 14 3E EE 40 : ..(17..)..s..>.@
0210: B2 0E 42 99 96 1B B5 C8  6A 8C 9F 92 A9 90 1B FF : ..B.....j.......
0220: 1E E2 50 54 BF 00 00 01  0F 00 00 00 07 73 73 68 : ..PT.........ssh
0230: 2D 72 73 61 00 00 01 00  1B 1A AE C1 56 95 6A FF : -rsa........V.j.
0240: 3D E9 F2 EE A4 88 0A 6D  D2 EA CB A7 63 11 59 7C : =......m....c.Y|
0250: 3D 2C 61 1D B7 27 F9 AE  A5 78 6F C3 99 D6 C7 F4 : =,a..'...xo.....
0260: DB 43 CE CD F7 E0 98 E7  D1 B4 9F E7 95 B1 AF 71 : .C.............q
0270: A3 A0 75 5F 6B 3E CB BB  DD D0 5D AC 80 45 0D 0D : ..u_k>....]..E..
0280: 81 46 70 E6 A1 CA 3B BD  6D EF 17 CA 08 B2 AA 4C : .Fp...;.m......L
0290: 76 2D AE 7E BD 90 D3 E7  AD 2A 79 FE 4E 37 11 11 : v-.~.....*y.N7..
02a0: 77 ED 92 9F 16 E5 BE F6  66 5C 9C 38 B4 EB 70 0F : w.......f\.8..p.
02b0: BE 95 9E 4C 9A 6C EC 8C  09 92 40 99 B1 7E 13 13 : ...L.l....@..~..
02c0: 2F 7B 6F 67 FA FF 8B 08  60 77 4C 8B 1C B2 04 3D : /{og....`wL....=
02d0: C1 73 05 2D EE 5B 0D B4  30 07 C2 15 17 1D 3E A5 : .s.-.[..0.....>.
02e0: 19 F9 33 04 F5 5E EA 4D  E7 65 8B 04 31 EC CB C8 : ..3..^.M.e..1...
02f0: D9 5A 91 F1 25 6D 9C 10  A5 BE F0 41 9E D5 B8 A6 : .Z..%m.....A....
0300: 4A 0C 4E 39 AD EF F6 89  0F 47 E5 70 17 9D DE 28 : J.N9.....G.p...(
0310: 31 11 D3 57 EA A0 EB 93  14 79 AF 5A CA 89 56 C3 : 1..W.....y.Z..V.
0320: 1A 75 33 62 0C 37 A3 1E  0E D4 7A 41 14 53 03 8F : .u3b.7....zA.S..
0330: BA C8 43 DC 1D 57 A5 6E  00 00 00 00 00 00 00 00 : ..C..W.n........
0340: 00 00 00 0C 0A 15 00 00  00 00 00 00 00 00 00 00 : ................
=> libssh2_transport_read() plain (819 bytes)
0000: 1F 00 00 01 17 00 00 00  07 73 73 68 2D 72 73 61 : .........ssh-rsa
0010: 00 00 00 03 01 00 01 00  00 01 01 00 CA 33 C1 50 : .............3.P
0020: CB C3 7E 8C C9 A8 4C 7E  BE 68 D8 3E 92 63 0D 73 : ..~...L~.h.>.c.s
0030: 23 F3 CE 48 DA 30 BB 39  3F 72 C8 B6 D8 05 3F F6 : #..H.0.9?r....?.
0040: FE F8 7B 54 F3 9C 14 69  B1 29 C5 2C B2 21 36 19 : ..{T...i.).,.!6.
0050: 96 72 16 85 2E 87 0B EB  D6 94 4E 21 94 92 87 20 : .r........N!... 
0060: 11 46 B0 9C 7D 0E 3A D6  8D 49 D1 C3 AF 46 A2 A0 : .F..}.:..I...F..
0070: 6D CA 83 31 3D F2 10 42  A3 59 C1 68 27 C4 45 CE : m..1=..B.Y.h'.E.
0080: 16 59 0B 94 96 3D 45 56  9D 9F 36 4C AF A6 53 02 : .Y...=EV..6L..S.
0090: AE 75 9E D7 2D 75 71 87  A0 C2 52 1B DD 89 2F D5 : .u..-uq...R.../.
00a0: AD 4E E8 AA B0 19 37 BE  2B 61 CE 70 C7 CD 02 8E : .N....7.+a.p....
00b0: 6A D1 5C B1 92 E0 0C 6F  E9 2A 0A 78 22 CC 80 72 : j.\....o.*.x"..r
00c0: EE 3D 05 F6 B0 33 2D 0F  B6 DF F5 1C ED 03 5C FD : .=...3-.......\.
00d0: 68 73 BE 84 F1 9F 44 F7  E5 51 7E FC 76 9F F2 B3 : hs....D..Q~.v...
00e0: 33 1C 82 0E AC B0 F3 42  85 20 6A 40 B7 34 11 B7 : 3......B. j@.4..
00f0: E2 97 0B F9 59 E2 D8 DC  4D 55 57 17 C4 F7 4C E4 : ....Y...MUW...L.
0100: 68 84 99 B2 BC DA 54 C6  08 09 17 8A F2 CA 9D 7D : h.....T........}
0110: 95 6B 05 C6 7E 22 6B 4F  4D 59 50 C5 00 00 01 00 : .k..~"kOMYP.....
0120: 7D E5 D1 F5 94 18 04 0A  97 67 A9 A5 EF 01 5B 1C : }........g....[.
0130: C9 31 85 E1 3A 47 10 8F  1C 14 CD 35 31 34 2D D8 : .1..:G.....514-.
0140: 0E 5D 31 85 EB D1 6A F7  A2 B8 E5 42 D5 27 9C C2 : .]1...j....B.'..
0150: 99 54 73 10 4A 53 B8 87  77 31 9C 5D B5 66 7E E5 : .Ts.JS..w1.].f~.
0160: 0F F3 CB AA B8 B4 F0 33  87 57 89 0E 24 03 9B 5F : .......3.W..$.._
0170: A8 31 5C AC 41 30 E4 36  05 0F 90 6F A7 6C E7 3B : .1\.A0.6...o.l.;
0180: 81 1E C0 7D 71 F0 90 5E  36 73 53 B0 E8 21 AC 47 : ...}q..^6sS..!.G
0190: C9 D1 0E C3 AF 9E 2C 59  C1 89 73 E7 20 7D 6A 64 : ......,Y..s. }jd
01a0: 5F E7 B1 BA FE 31 47 9E  0E 7A C7 13 DB 98 64 FD : _....1G..z....d.
01b0: 29 EB 3D 35 43 CB 7B 70  C4 91 80 19 68 45 37 E2 : ).=5C.{p....hE7.
01c0: 37 A1 A4 9C 20 91 7F 1F  CD DF 98 02 AD 84 97 11 : 7... ...........
01d0: 40 A1 BB 13 46 A9 EB D7  25 B1 9C 4A 11 69 74 F7 : @...F...%..J.it.
01e0: F3 D7 E1 8B 03 2C A6 23  BF 43 9C D1 86 55 3C A8 : .....,.#.C...U<.
01f0: A1 8D 45 21 A2 9B 9A B2  05 64 80 9D BE 28 31 37 : ..E!.....d...(17
0200: B7 89 29 8B 9B 73 CE 14  3E EE 40 B2 0E 42 99 96 : ..)..s..>.@..B..
0210: 1B B5 C8 6A 8C 9F 92 A9  90 1B FF 1E E2 50 54 BF : ...j.........PT.
0220: 00 00 01 0F 00 00 00 07  73 73 68 2D 72 73 61 00 : ........ssh-rsa.
0230: 00 01 00 1B 1A AE C1 56  95 6A FF 3D E9 F2 EE A4 : .......V.j.=....
0240: 88 0A 6D D2 EA CB A7 63  11 59 7C 3D 2C 61 1D B7 : ..m....c.Y|=,a..
0250: 27 F9 AE A5 78 6F C3 99  D6 C7 F4 DB 43 CE CD F7 : '...xo......C...
0260: E0 98 E7 D1 B4 9F E7 95  B1 AF 71 A3 A0 75 5F 6B : ..........q..u_k
0270: 3E CB BB DD D0 5D AC 80  45 0D 0D 81 46 70 E6 A1 : >....]..E...Fp..
0280: CA 3B BD 6D EF 17 CA 08  B2 AA 4C 76 2D AE 7E BD : .;.m......Lv-.~.
0290: 90 D3 E7 AD 2A 79 FE 4E  37 11 11 77 ED 92 9F 16 : ....*y.N7..w....
02a0: E5 BE F6 66 5C 9C 38 B4  EB 70 0F BE 95 9E 4C 9A : ...f\.8..p....L.
02b0: 6C EC 8C 09 92 40 99 B1  7E 13 13 2F 7B 6F 67 FA : l....@..~../{og.
02c0: FF 8B 08 60 77 4C 8B 1C  B2 04 3D C1 73 05 2D EE : ...`wL....=.s.-.
02d0: 5B 0D B4 30 07 C2 15 17  1D 3E A5 19 F9 33 04 F5 : [..0.....>...3..
02e0: 5E EA 4D E7 65 8B 04 31  EC CB C8 D9 5A 91 F1 25 : ^.M.e..1....Z..%
02f0: 6D 9C 10 A5 BE F0 41 9E  D5 B8 A6 4A 0C 4E 39 AD : m.....A....J.N9.
0300: EF F6 89 0F 47 E5 70 17  9D DE 28 31 11 D3 57 EA : ....G.p...(1..W.
0310: A0 EB 93 14 79 AF 5A CA  89 56 C3 1A 75 33 62 0C : ....y.Z..V..u3b.
0320: 37 A3 1E 0E D4 7A 41 14  53 03 8F BA C8 43 DC 1D : 7....zA.S....C..
0330: 57 A5 6E                                         : W.n
[libssh2] 0.061889 Transport: Packet type 31 received, length=819
[libssh2] 0.061895 Transport: Looking for packet of type: 31
[libssh2] 0.061956 Key Ex: Server's MD5 Fingerprint: d6:ba:08:39:7f:1d:a0:0f:4b:36:3b:e2:9f:5f:e3:1c
[libssh2] 0.061975 Key Ex: Server's SHA1 Fingerprint: a9:cc:4a:b6:63:3e:d5:e4:c9:61:b7:bd:e8:74:7f:aa:30:e3:3b:f0
[libssh2] 0.077928 Key Ex: Sending NEWKEYS message
=> libssh2_transport_write plain (1 bytes)
0000: 15                                               : .
[libssh2] 0.078023 Socket: Sent 16/16 bytes at 0x1023630
=> libssh2_transport_write send() (16 bytes)
0000: 00 00 00 0C 0A 15 82 4F  A9 76 30 95 BD F9 0A E6 : .......O.v0.....
[libssh2] 0.078035 Transport: Looking for packet of type: 21
=> libssh2_transport_read() plain (1 bytes)
0000: 15                                               : .
[libssh2] 0.078043 Transport: Packet type 21 received, length=1
[libssh2] 0.078047 Transport: Looking for packet of type: 21
[libssh2] 0.078050 Key Ex: Received NEWKEYS message
[libssh2] 0.078053 Key Ex: session_id calculated
[libssh2] 0.078131 Key Ex: Client to Server IV and Key calculated
[libssh2] 0.078165 Key Ex: Server to Client IV and Key calculated
[libssh2] 0.078188 Key Ex: Client to Server HMAC Key calculated
[libssh2] 0.078196 Key Ex: Server to Client HMAC Key calculated
[libssh2] 0.078199 Key Ex: Client to Server compression initialized
[libssh2] 0.078202 Key Ex: Server to Client compression initialized
[libssh2] 0.078208 Transport: Requesting userauth service
=> libssh2_transport_write plain (17 bytes)
0000: 05 00 00 00 0C 73 73 68  2D 75 73 65 72 61 75 74 : .....ssh-useraut
0010: 68                                               : h
[libssh2] 0.078300 Socket: Sent 52/52 bytes at 0x1023630
=> libssh2_transport_write send() (52 bytes)
0000: 09 D5 73 16 16 C7 1E 39  03 DD FF 6F 6D 3E DD AD : ..s....9...om>..
0010: 36 F6 0C 68 A9 A0 2C 07  E4 C1 78 15 9E 48 5B 40 : 6..h..,...x..H[@
0020: E7 49 BD 44 36 A9 D5 9E  7F 88 BF D5 C5 8A 2B 59 : .I.D6.........+Y
0030: FB B2 F9 13                                      : ....
[libssh2] 0.078318 Transport: Looking for packet of type: 6
[libssh2] 0.120699 Socket: Recved 52/16384 bytes to 0x101f5f0+0
=> libssh2_transport_read() raw (52 bytes)
0000: 7D 98 E3 64 29 0A 93 2D  69 E0 64 46 C9 61 D6 FB : }..d)..-i.dF.a..
0010: BB 42 3D BA 06 75 BA DC  7B 75 D5 E5 4D 7D 01 33 : .B=..u..{u..M}.3
0020: 3B FD AE D0 A3 23 A1 DB  8A 74 1A 5E 7D 2F FF CC : ;....#...t.^}/..
0030: E4 D1 21 86                                      : ..!.
=> libssh2_transport_read() plain (17 bytes)
0000: 06 00 00 00 0C 73 73 68  2D 75 73 65 72 61 75 74 : .....ssh-useraut
0010: 68                                               : h
[libssh2] 0.120825 Transport: Packet type 6 received, length=17
[libssh2] 0.120832 Transport: Looking for packet of type: 6
[libssh2] 0.120865 Userauth: Loading public key file: /home/xyz/.ssh/id_rsa.pub
[libssh2] 0.120971 Userauth: Attempting publickey authentication
=> libssh2_transport_write plain (334 bytes)
0000: 32 00 00 00 03 72 74 73  00 00 00 0E 73 73 68 2D : 2....xyz....ssh-
0010: 63 6F 6E 6E 65 63 74 69  6F 6E 00 00 00 09 70 75 : connection....pu
0020: 62 6C 69 63 6B 65 79 00  00 00 00 07 73 73 68 2D : blickey.....ssh-
0030: 72 73 61 00 00 01 17 00  00 00 07 73 73 68 2D 72 : rsa........ssh-r
0040: 73 61 00 00 00 03 01 00  01 00 00 01 01 00 E2 C4 : sa..............
0050: 38 14 DF BC C8 4E 8B 5F  B3 AE 77 4E EB A7 D9 63 : 8....N._..wN...c
0060: 39 09 9E 6D 0C 92 86 EA  4E 43 65 76 8B 2A 1D 9A : 9..m....NCev.*..
0070: 63 5E 86 8E E8 21 67 C1  6D 7C 5A 25 81 A0 F6 22 : c^...!g.m|Z%..."
0080: 7B 70 20 B7 9C 90 62 9B  59 08 9F BE D6 22 A7 3A : {p ...b.Y....".:
0090: 6B 7F 1E D3 39 03 BD F0  F4 8E D4 F7 32 38 55 76 : k...9.......28Uv
00a0: 71 DD 3B E3 D0 CB A8 D1  C2 AD 68 8C 01 FA AB 07 : q.;.......h.....
00b0: 5E 9C 35 64 19 B3 30 4F  88 88 9F 0B 71 C6 ED 5D : ^.5d..0O....q..]
00c0: F1 BC DA E1 F5 5E 53 5F  DD C8 5A A1 58 B6 AC 59 : .....^S_..Z.X..Y
00d0: 05 43 B8 D5 8F EA 05 5C  E0 F2 9F 7C BB 7C AD 9A : .C.....\...|.|..
00e0: EA 8C D5 BB FD 18 A5 82  A0 1D 8C 97 6B 2D 13 A0 : ............k-..
00f0: BE B0 6E 05 73 3E AF 44  83 36 03 77 F0 E3 F0 54 : ..n.s>.D.6.w...T
0100: 9D 24 5E FD 03 E3 4C C2  3D AE 7A 1D 54 21 9B 1B : .$^...L.=.z.T!..
0110: 0D B0 5C 3C C6 3C E1 61  F0 CC 81 76 EE 16 C7 0D : ..\<.<.a...v....
0120: 25 A2 2D 47 28 3E B3 B4  3A 7B 7D 00 49 0A 21 A3 : %.-G(>..:{}.I.!.
0130: 4E 8B A3 E3 04 3C 51 B1  9B 67 DA 1A 0B 8E 53 13 : N....<Q..g....S.
0140: 7A 62 49 F8 CE 8D D8 80  F5 4E B7 A8 EC 9D       : zbI......N....
[libssh2] 0.121231 Socket: Sent 372/372 bytes at 0x1023630
=> libssh2_transport_write send() (372 bytes)
0000: 9E EA F7 59 EA D3 47 DF  CD E7 32 63 60 D1 D3 71 : ...Y..G...2c`..q
0010: C5 8C D8 5A 43 A6 BF DE  3F B9 DF A7 76 28 09 2B : ...ZC...?...v(.+
0020: F4 C9 FB 51 C8 1C C7 B8  5D B2 11 6B 93 12 C7 B0 : ...Q....]..k....
0030: 91 EA D4 38 F0 7B 2B 87  59 A4 85 92 A5 CC 82 8A : ...8.{+.Y.......
0040: 10 4A B1 14 9D 60 36 72  79 D1 E3 52 8C 91 70 D9 : .J...`6ry..R..p.
0050: 3E 4C 25 E1 13 DE 91 10  E2 10 53 23 9E 8D DB 9D : >L%.......S#....
0060: 2F 3F BB 6B 32 01 D0 B5  42 2A 6F C7 7B 47 57 55 : /?.k2...B*o.{GWU
0070: C3 49 02 8A B0 E3 C9 E4  FF 87 27 C6 AD F5 6E CE : .I........'...n.
0080: D1 4D BA 11 9C 0F 7E 46  19 5D BE CC 78 AC D1 45 : .M....~F.]..x..E
0090: 17 32 C2 13 85 DA A0 78  9A 0D B2 F1 01 E6 78 B7 : .2.....x......x.
00a0: 27 93 08 FA 58 A7 15 2C  1A E7 BE EE C5 8B C7 36 : '...X..,.......6
00b0: E7 0B A8 FE 34 67 5A F6  70 99 AB 8A A0 4B AB 42 : ....4gZ.p....K.B
00c0: ED 85 D3 77 F9 F7 80 CA  E6 E6 7C 0B 06 FB 94 80 : ...w......|.....
00d0: E5 30 ED 51 50 37 26 6F  AF E1 E2 5E 27 D4 23 A3 : .0.QP7&o...^'.#.
00e0: CA 74 31 07 64 43 65 75  2C 0B 79 06 FA 52 83 43 : .t1.dCeu,.y..R.C
00f0: B2 A7 8C 22 40 33 D6 69  13 A8 86 AA EC 33 84 E2 : ..."@3.i.....3..
0100: 8F BE C1 20 DD C2 E7 42  76 DE 09 76 46 17 48 21 : ... ...Bv..vF.H!
0110: 28 2A E1 52 D7 41 09 5C  DF C8 84 DF E6 B4 D9 BA : (*.R.A.\........
0120: 5C 1D 86 AD 60 3C C6 FF  1F 48 46 9D 4E B5 34 B8 : \...`<...HF.N.4.
0130: A6 30 EC 81 36 31 66 5D  82 19 90 DA 18 9E 52 A5 : .0..61f]......R.
0140: E4 F9 2B 9E E3 0F FF 94  2D F1 A0 E9 21 E0 44 FA : ..+.....-...!.D.
0150: 7B 3A 2D 26 B2 7E F3 E1  58 75 53 F0 B9 09 33 57 : {:-&.~..XuS...3W
0160: AE B8 74 AB 8C A3 44 C9  BF DB 05 30 B3 5E 1C C0 : ..t...D....0.^..
0170: E4 B1 DF 14                                      : ....
[libssh2] 0.121369 Failure Event: -7 - Unable to send userauth-publickey request
Unable to send userauth-publickey request (-7 LIBSSH2_ERROR_SOCKET_SEND) at ./foo.pl line 22.
Net::SSH2::DESTROY object 0xd3fe20
[libssh2] 0.121872 Transport: Freeing session resource
[libssh2] 0.121887 Transport: Extra packets left 0
salva commented 5 years ago

[libssh2] 0.006054 Transport: Sending Banner: SSH-2.0-libssh2_1.4.3

libssh version 1.4.3 is very old and completely unreliable. You should upgrade to the latest 1.8.2 version and try again.

davewood commented 5 years ago

we updated to debian 9.8 (libssh 1.7.0) and it works again now.

thank you for your support.