Subject: Re: agent support

Re: agent support

From: Thomas Stover <thomas_at_wsinnovations.com>
Date: Thu, 17 Jun 2010 01:13:17 -0500

On Thu, 17 Jun 2010 07:24:29 +0200, Peter Stuge <peter_at_stuge.se> wrote:
> Compile libssh2 with --enable-debug and include
>
> libssh2_trace(session, ~0);
>
> in your program.

thomas_at_K-9:~/src/libssh2-1.2.7-20100617/example$ ssh-add -l
2047 ec:e3:da:36:ed:9f:a8:10:38:2f:33:b8:62:a4:4a:6b
/home/thomas/.ssh/identity (RSA)
thomas_at_K-9:~/src/libssh2-1.2.7-20100617/example$ ssh 127.0.0.1
Linux K-9 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010
x86_64 GNU/Linux
Ubuntu 10.04 LTS

Welcome to Ubuntu!
 * Documentation: https://help.ubuntu.com/

41 packages can be updated.
0 updates are security updates.

Last login: Thu Jun 17 01:10:08 2010 from localhost
thomas_at_K-9:~$ logout
Connection to 127.0.0.1 closed.
thomas_at_K-9:~/src/libssh2-1.2.7-20100617/example$
LD_LIBRARY_PATH=/home/thomas/lib/ ./ssh2_agent 127.0.0.1 thomas
=> libssh2_transport_write plain (37 bytes)
0000: 32 00 00 00 06 74 68 6F 6D 61 73 00 00 00 0E 73 : 2....thomas....s
0010: 73 68 2D 63 6F 6E 6E 65 63 74 69 6F 6E 00 00 00 : sh-connection...
0020: 04 6E 6F 6E 65 : .none
[libssh2] 0.732547 Socket: Sent 68/68 bytes at 0x19005b0
=> libssh2_transport_write send() (68 bytes)
0000: 02 19 1F 86 89 AD AC 06 7E 8E 47 FA 44 11 19 95 : ........~.G.D...
0010: D7 D1 01 74 4B 11 7E C2 13 9A 04 AA 94 26 37 B3 : ...tK.~......&7.
0020: 65 F9 35 05 C1 37 E1 33 FE DB F4 15 93 E9 D8 99 : e.5..7.3........
0030: 5B 11 17 9B 05 74 A8 A6 52 20 95 CA 1E F9 43 60 : [....t..R ....C`
0040: C0 E5 3F EB : ..?.
[libssh2] 0.732572 Transport: Looking for packet of type: 52
[libssh2] 0.732574 Transport: Looking for packet of type: 51
[libssh2] 0.732578 Socket: Error recving 16384 bytes to 0x18fb508+0: 11
[libssh2] 0.732582 Failure Event: -37 - Would block requesting userauth
list
[libssh2] 0.734884 Transport: Looking for packet of type: 52
[libssh2] 0.734886 Transport: Looking for packet of type: 51
[libssh2] 0.734890 Socket: Recved 68/16384 bytes to 0x18fb508+0
=> libssh2_transport_read() raw (68 bytes)
0000: D7 B6 4C 36 DC A5 BB B4 55 E8 67 4C 56 09 98 3D : ..L6....U.gLV..=
0010: 22 9C 44 9F 0E 32 CD BF FD 23 45 ED 88 BB 57 DC : ".D..2...#E...W.
0020: 7E FB AB A3 5F 56 9E D0 BA 76 7D 36 6E BD 61 B7 : ~..._V...v}6n.a.
0030: FB A8 D1 04 6B 0F 64 3A 4F 87 8D C4 B4 D3 3D DF : ....k.d:O.....=.
0040: 49 20 71 87 : I q.
=> libssh2_transport_read() plain (24 bytes)
0000: 33 00 00 00 12 70 75 62 6C 69 63 6B 65 79 2C 70 : 3....publickey,p
0010: 61 73 73 77 6F 72 64 00 : assword.
[libssh2] 0.734919 Transport: Packet type 51 received, length=24
[libssh2] 0.734922 Transport: Looking for packet of type: 52
[libssh2] 0.734924 Transport: Looking for packet of type: 51
[libssh2] 0.734930 Userauth: Permitted auth methods: publickey,password
Authentication methods: publickey,password
[libssh2] 0.736258 Failure Event: 0 - agent list id failed
[libssh2] 0.736267 Userauth: Attempting publickey authentication
=> libssh2_transport_write plain (334 bytes)
0000: 32 00 00 00 06 74 68 6F 6D 61 73 00 00 00 0E 73 : 2....thomas....s
0010: 73 68 2D 63 6F 6E 6E 65 63 74 69 6F 6E 00 00 00 : sh-connection...
0020: 09 70 75 62 6C 69 63 6B 65 79 00 00 00 00 07 73 : .publickey.....s
0030: 73 68 2D 72 73 61 00 00 01 14 00 00 00 07 73 73 : sh-rsa........ss
0040: 68 2D 72 73 61 00 00 00 01 25 00 00 01 00 7E 6A : h-rsa....%....~j
0050: 1C D7 9F F4 8D 8D 79 33 0E 88 A5 9F DF 89 11 7C : ......y3.......|
0060: B7 42 E1 67 C3 8E 1A 96 71 1C 4B C9 16 81 20 CB : .B.g....q.K... .
0070: 96 8C 18 C9 94 78 F4 E5 6C EE 48 F7 B2 C5 25 22 : .....x..l.H...%"
0080: A7 92 4C 06 85 C6 5D 0D 35 43 81 83 11 E2 D9 97 : ..L...].5C......
0090: 2C F9 E7 7F F8 01 18 DC 3B 9E 3F B3 A0 9D 0B 8B : ,.......;.?.....
00a0: 18 59 5A 17 4E 3A 87 AC 0B DA A0 FB 07 4B 76 C3 : .YZ.N:.......Kv.
00b0: F1 7E 85 32 B3 30 B9 CF 30 41 13 CD 98 B7 57 BB : .~.2.0..0A....W.
00c0: B0 9F DE 5C 32 EA 83 69 EC EE 1C D5 EF 9B F3 FD : ...\2..i........
00d0: 61 B2 26 03 2C C5 EA D2 1D 14 D3 19 F0 BF C6 1D : a.&.,...........
00e0: 7E 81 50 7B 41 F6 1D 34 03 7E 0A EC 7E 01 83 12 : ~.P{A..4.~..~...
00f0: F2 3A EF D2 E5 45 3E 46 D2 A9 51 86 53 07 9B ED : .:...E>F..Q.S...
0100: 3B A7 4D 09 59 21 33 44 60 BA CA B8 59 1D 6A DB : ;.M.Y!3D`...Y.j.
0110: F1 3A B6 CF 41 40 91 3B F3 25 2E 2F 32 7D 7C F8 : .:..A@.;.%./2}|.
0120: 42 72 34 39 C7 C3 9E 97 48 DF 12 45 87 3C 9D 64 : Br49....H..E.<.d
0130: F1 E8 4B 98 87 2A 5B 05 0F 5E 9C 61 8B 6A E0 6D : ..K..*[..^.a.j.m
0140: 96 BB 23 1E 71 E0 C8 C8 34 89 BF 4D CA 59 : ..#.q...4..M.Y
[libssh2] 0.736341 Socket: Sent 372/372 bytes at 0x1900280
=> libssh2_transport_write send() (372 bytes)
0000: 69 C2 97 89 C1 9F FC A0 C3 A4 FD CF 7F 1A 05 57 : i..............W
0010: 89 F7 B4 73 D2 B7 B1 C6 27 29 D8 95 4A 29 9F 21 : ...s....')..J).!
0020: E2 CA FF 3B D5 1E 70 82 1D 74 79 DF 3C 15 D2 2B : ...;..p..ty.<..+
0030: 70 79 F8 1C 6A 9D 84 34 F4 68 33 EA CB D3 77 E8 : py..j..4.h3...w.
0040: 80 79 8B 2B 77 0F C0 A0 B1 4C E8 C4 16 9B 85 B7 : .y.+w....L......
0050: D1 46 52 CC E5 29 6D 7B 68 C3 AC 54 D6 8B D6 0B : .FR..)m{h..T....
0060: D4 64 4D 87 D1 E5 9B 37 52 C2 27 CB 59 AB DB 55 : .dM....7R.'.Y..U
0070: 08 0E D2 F2 FE 9F 3F 9A 3F F8 FE 61 66 8E F3 17 : ......?.?..af...
0080: 29 D5 6F F4 DD F7 EC E9 41 5A 00 39 DE 3C 51 B2 : ).o.....AZ.9.<Q.
0090: 51 67 85 0B 14 48 70 1D 7E 5E E8 D3 35 9D 88 E4 : Qg...Hp.~^..5...
00a0: D2 AE 49 F2 D2 AA 31 2B E5 2C E2 EE FA DA 53 7F : ..I...1+.,....S.
00b0: 4D 8E 0E 41 C7 78 74 2C 29 39 CD 8F 75 68 9B 66 : M..A.xt,)9..uh.f
00c0: C7 1E 49 B4 3C 3D D1 5B 66 BE 69 8F DD 4F 7A 4B : ..I.<=.[f.i..OzK
00d0: E7 C5 88 39 DA 36 BB 0F B1 D5 30 24 C3 2E 11 83 : ...9.6....0$....
00e0: 83 40 01 07 CF E6 68 74 A8 34 DC C6 E7 19 D6 17 : .@....ht.4......
00f0: A4 07 61 DA 17 8A 0D B0 01 E9 CB BE 82 93 F9 2B : ..a............+
0100: 25 34 5D 16 66 53 B7 52 EE 3B 3A 44 DE 46 E2 D1 : %4].fS.R.;:D.F..
0110: 5D 0A 20 BC 91 C5 63 4B 83 2A 95 B7 C1 0C 2B 0C : ]. ...cK.*....+.
0120: 34 16 00 EC 1B 76 04 46 F4 FB 77 82 A4 D2 C2 3B : 4....v.F..w....;
0130: F1 7E CF 5C 4C 12 FE DA A3 72 C4 6C 03 2E 67 F7 : .~.\L....r.l..g.
0140: 69 10 F2 26 48 87 BF 27 FC 95 A5 2D 42 28 CF 09 : i..&H..'...-B(..
0150: D7 C0 46 56 C1 AE A9 8D F2 FB 76 77 F3 05 E4 1A : ..FV......vw....
0160: CF 4E D7 31 02 08 E2 61 0A 10 FA AD E1 90 B7 84 : .N.1...a........
0170: B9 B4 7A 0B : ..z.
[libssh2] 0.736401 Transport: Looking for packet of type: 52
[libssh2] 0.736403 Transport: Looking for packet of type: 51
[libssh2] 0.736406 Transport: Looking for packet of type: 60
[libssh2] 0.736409 Socket: Error recving 16384 bytes to 0x18fb508+0: 11
[libssh2] 0.736412 Failure Event: -37 - Would block
        Authentication with username thomas and public key
/home/thomas/.ssh/identity failed!
Couldn't continue authentication
[libssh2] 0.736434 Failure Event: -13 - failed closing the agent socket
[libssh2] 0.736438 Transport: Disconnecting: reason=11, desc=Normal
Shutdown, Thank you for playing, lang=
=> libssh2_transport_write plain (51 bytes)
0000: 01 00 00 00 0B 00 00 00 26 4E 6F 72 6D 61 6C 20 : ........&Normal
0010: 53 68 75 74 64 6F 77 6E 2C 20 54 68 61 6E 6B 20 : Shutdown, Thank
0020: 79 6F 75 20 66 6F 72 20 70 6C 61 79 69 6E 67 00 : you for playing.
0030: 00 00 00 : ...
[libssh2] 0.736461 Socket: Sent 84/84 bytes at 0x1900dc0
=> libssh2_transport_write send() (84 bytes)
0000: D5 4D C3 45 49 1C 9A 1E A5 99 29 2A 84 71 45 86 : .M.EI.....)*.qE.
0010: FB DC 49 54 0C F6 42 2D 6B FF 99 CF 3D 34 B0 D4 : ..IT..B-k...=4..
0020: 45 96 C7 D5 04 20 D3 AA 5F 65 EF 16 0C BE E5 A7 : E.... .._e......
0030: 5C 34 AF 62 03 D6 CC 8B FC F0 BE FD 39 87 C3 49 : \4.b........9..I
0040: 62 10 36 76 78 E9 D8 D0 48 91 E7 B5 66 10 0F CA : b.6vx...H...f...
0050: BD 85 15 D1 : ....
[libssh2] 0.741679 Transport: Freeing session resource
all done!
thomas_at_K-9:~/src/libssh2-1.2.7-20100617/example$

btw, did I just post my private key?

-- 
www.thomasstover.com
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-06-17