IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Interop lsh and SSH-2.0-GitLab-SSHD



>> I send a SSH_MSG_USERAUTH_REQUEST with "publickey", algorithm name
>> "rsa- sha2-256", and signature included right away. With "ssh-rsa"
>> in the key blob, and "rsa-sha2-256" in the signature blob.

>> But authenticating in the same way to gitlab.com still fails.  The
>> curious thing is that the server appears to just close the
>> connection, I don't get any SSH_MSG_USERAUTH_FAILURE, not even a
>> SSH_MSG_DISCONNECT.

> I'm doing the same thing:

> Wrote SSH_MSG_USERAUTH_REQUEST (50) packet, length 497.
> 0000: 00 00 00 0A XX XX XX XX XX XX XX XX XX XX 00 00 ....XXXXXXXXXX..
> 0016: 00 0E 73 73 68 2D 63 6F 6E 6E 65 63 74 69 6F 6E ..ssh-connection
> 0032: 00 00 00 09 70 75 62 6C 69 63 6B 65 79 01 00 00 ....publickey...
> 0048: 00 0C 72 73 61 2D 73 68 61 32 2D 32 35 36 00 00 ..rsa-sha2-256..
> 0064: 00 D7 00 00 00 07 73 73 68 2D 72 73 61 00 00 00 ......ssh-rsa...
> 0080: 03 01 00 01 00 00 00 C1 00 E4 C5 6B 62 93 98 2F ...........kb../
> [...]

> and getting back the expected:

> Read SSH_MSG_USERAUTH_FAILURE (51) packet, length 14.
> 0000: 00 00 00 09 70 75 62 6C 69 63 6B 65 79 00       ....publickey.

I just tried again with moussh, and this time I looked at the packet
exchange in more detail.

After algorithm negotiation and kex (which are verbose enough I'd
rather not quote them here):

1161 Out data (1):
1162    0   15                                                ·
1163 In data (1):
1164    0   15                                                ·
1165 Out data (17):
1166    0   05 00 00 00 0c 73 73 68  2d 75 73 65 72 61 75 74  ·····ssh-useraut
1167   10   68                                                h
1168 In data (17):
1169    0   06 00 00 00 0c 73 73 68  2d 75 73 65 72 61 75 74  ·····ssh-useraut
1170   10   68                                                h
1171 Out data (36):
1172    0   32 00 00 00 05 6d 6f 75  73 65 00 00 00 0e 73 73  2····mouse····ss
1173   10   68 2d 63 6f 6e 6e 65 63  74 69 6f 6e 00 00 00 04  h-connection····
1174   20   6e 6f 6e 65                                       none
1175 In data (15):
1176    0   33 00 00 00 09 70 75 62  6c 69 63 6b 65 79 00     3····publickey·
1177 Out data (347):
1178    0   32 00 00 00 05 6d 6f 75  73 65 00 00 00 0e 73 73  2····mouse····ss
1179   10   68 2d 63 6f 6e 6e 65 63  74 69 6f 6e 00 00 00 09  h-connection····
1180   20   70 75 62 6c 69 63 6b 65  79 00 00 00 00 0c 72 73  publickey·····rs
1181   30   61 2d 73 68 61 32 2d 32  35 36 00 00 01 1d 00 00  a-sha2-256······
1182   40   00 07 73 73 68 2d 72 73  61 00 00 00 09 00 80 00  ··ssh-rsa·······
1183   50   80 04 00 00 00 01 00 00  01 01 00 aa 82 a6 3f 3b  ···········ª·¦?;
...240 octets of key data snipped...
1199  150   54 24 4b 6d 67 57 55 40  63 c4 1b                 T$KmgWU@cÄ·

and I never get anything back in return.  Here's the tail of a tcpdump
trace (I've manually replaced my end's address with "me" and gitlab's
with "gitlab").

13:09:05.425653 me.60712 > gitlab.22: P 3329:3397(68) ack 1622 win 17280 <nop,nop,timestamp 1490209 2197010620> [flowlabel 0xcc0a1]
13:09:05.437194 gitlab.22 > me.60712: . ack 3397 win 7 <nop,nop,timestamp 2197025278 1490209> [flowlabel 0x3f48a]
13:09:05.472672 gitlab.22 > me.60712: P 1622:1674(52) ack 3397 win 8 <nop,nop,timestamp 2197025313 1490209> [flowlabel 0x3f48a]
13:09:05.504600 me.60712 > gitlab.22: P 3397:3465(68) ack 1674 win 17280 <nop,nop,timestamp 1490210 2197025313> [flowlabel 0xcc0a1]
13:09:05.551860 gitlab.22 > me.60712: P 1674:1726(52) ack 3465 win 8 <nop,nop,timestamp 2197025392 1490210> [flowlabel 0x3f48a]
13:09:05.729300 me.60712 > gitlab.22: . ack 1726 win 17280 <nop,nop,timestamp 1490210 2197025392> [flowlabel 0xcc0a1]
13:09:05.736058 me.60712 > gitlab.22: P 3465:3853(388) ack 1726 win 17280 <nop,nop,timestamp 1490210 2197025392> [flowlabel 0xcc0a1]
13:09:05.785870 gitlab.22 > me.60712: F 1726:1726(0) ack 3853 win 8 <nop,nop,timestamp 2197025626 1490210> [flowlabel 0x3f48a]
13:09:05.786645 me.60712 > gitlab.22: . ack 1727 win 17280 <nop,nop,timestamp 1490210 2197025626> [flowlabel 0xcc0a1]
13:09:05.942069 me.60712 > gitlab.22: F 3853:3853(0) ack 1727 win 17280 <nop,nop,timestamp 1490210 2197025626> [flowlabel 0xcc0a1]
13:09:05.952658 gitlab.22 > me.60712: . ack 3854 win 7 <nop,nop,timestamp 2197025793 1490210> [flowlabel 0x3f48a]

I don't know what's getting behind it, but something certainly is
behaving rather oddly on gitlab's end.  (At least the TCP connection is
being shut down properly; I half expected to get an RST back.)

I note you (pgut001@) XXed out the username in your trace.  Is it a
valid gitlab.com username and you're just using a key they don't
accept?  If so, perhaps that's relevant - as you can see, above, the
username I sent was "mouse", which strikes me as unlikely to be
anything like what they want.  nisse@, are you sending a valid
gitlab.com username in your USERAUTH_REQUEST, or something more like
what I sent?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



Home | Main Index | Thread Index | Old Index