I am using putty to connect two ubuntu PC. One is OK but another one always has the error of remote side unexpectedly closed network connection. I have compared the SSH and raw data log between these two connections. Below is the difference between success and failed connection.
----successful message------
Incoming packet #0x3, type 6 / 0x06 (SSH2_MSG_SERVICE_ACCEPT)
00000000 00 00 00 0c 73 73 68 2d 75 73 65 72 61 75 74 68 ....ssh-userauth
Outgoing packet #0x4, type 50 / 0x32 (SSH2_MSG_USERAUTH_REQUEST)
00000000 00 00 00 04 72 6f 6f 74 00 00 00 0e 73 73 68 2d ....root....ssh-
00000010 63 6f 6e 6e 65 63 74 69 6f 6e 00 00 00 04 6e 6f connection....no
00000020 6e 65 ne
Outgoing raw data at 2019-06-06 10:51:13
00000000 25 9a a1 ae cc ed c4 a5 7d e6 bc 7f ac be 9d 03 %.......}.......
00000010 2b bd 85 35 c9 7d 60 66 c5 82 6a 45 12 19 55 ba +..5.}`f..jE..U.
00000020 7a 44 03 f9 12 00 f2 97 df 5e db 9e 36 ee 5f d8 zD.......^..6._.
00000030 17 e8 54 15 19 36 ba 0f 48 8b eb 27 51 63 f8 00 ..T..6..H..'Qc..
00000040 8f 91 b8 64 b1 0e 84 71 3e f1 0d 5e 16 0f f2 5b ...d...q>..^...[
Incoming raw data at 2019-06-06 10:51:33
00000000 a7 9b 40 c1 40 b8 4a 2e 8c c7 13 1e 9f 73 d4 bf ..@[email protected]..
00000010 b1 13 12 2d dc 85 b5 b1 c6 d1 f2 58 e7 b9 e3 9b ...-.......X....
00000020 36 e6 4f 5d 7e 9c e1 fe b1 04 45 14 2a 38 a8 88 6.O]~.....E.*8..
00000030 28 51 e4 ff d3 d1 a5 14 9d 39 e1 46 72 d7 0b fa (Q.......9.Fr...
00000040 80 5d f7 f2 b2 f0 19 c2 d2 40 b0 70 84 03 f5 fe .][email protected]....
-----failed------
Incoming packet #0x3, type 6 / 0x06 (SSH2_MSG_SERVICE_ACCEPT)
00000000 00 00 00 0c 73 73 68 2d 75 73 65 72 61 75 74 68 ....ssh-userauth
Outgoing packet #0x4, type 50 / 0x32 (SSH2_MSG_USERAUTH_REQUEST)
00000000 00 00 00 04 72 6f 6f 74 00 00 00 0e 73 73 68 2d ....root....ssh-
00000010 63 6f 6e 6e 65 63 74 69 6f 6e 00 00 00 04 6e 6f connection....no
00000020 6e 65 ne
Outgoing raw data at 2019-06-04 16:36:29
00000000 7b 38 b6 ce 36 28 69 4f 59 6b 54 db 6a 7a 14 33 {8..6(iOYkT.jz.3
00000010 d4 9f ef 42 c4 89 e3 ed 36 d7 10 c0 f8 e3 69 ec ...B....6.....i.
00000020 3a 2a 92 79 67 56 49 b6 7c 76 1e 2a e5 87 41 e3 :*.ygVI.|v.*..A.
00000030 87 47 2e 74 77 aa 7c d9 45 99 8b b9 80 1a b0 66 .G.tw.|.E......f
00000040 85 ca 0c a0 42 b7 9c 22 de 47 17 31 5f 28 1e 7e ....B..".G.1_(.~
Event Log: Remote side unexpectedly closed network connection
Does anyone out there have any idea of it? Thanks in advance for all your help.
putty
/etc/hosts.allow
file on the inaccessible machine?