Subject: Re: ssh hangs for a while waiting to connect
To: Andrew Basterfield <list@lostgeneration.freeserve.co.uk>
From: Johan A. van Zanten <johan@ewranglers.com>
List: netbsd-users
Date: 03/05/2002 21:58:47
----In message <20020306004412.41633b57.list@lostgeneration.freeserve.co.uk>
>On Tue, 05 Mar 2002 16:59:06 -0500
>"Johan A. van Zanten" <johan@ewranglers.com> wrote:
>
>> brahma: SPARC-5 (170 MHz) 32 MB RAM, stock NetBSD 1.5.2
>> (OpenSSH_2.5.1 that comes with 1.5.2)
>
>I have just built OpenSSH 2.5.1 and that ssh connects using SSH2 in approx
>5 seconds. It seems the problem is protocol negotiation between OpenSSH 3
>and 2.5.1.
Unfrortunately, i see the same problem going from one vanilla NetBSD
1.5.2 to another: 2 minutes 20 seconds. (Or even staying on the same host)
Maybe it's something particular to my sshd/ssh configs, or the way i'm
generating host keys. I'll experiment some more (twiddle configs and
build other versions of OpenSSH) and see what i can figure out.
The command is: ssh -4 -2
The TCP dump timestamps do a good job of recording the timing:
21:42:05.953545 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: S 519778873:519778873(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp 119747 0>
21:42:05.954375 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: S 2383287813:2383287813(0) ack 519778874 win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp 15422 119747>
21:42:05.954580 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: . ack 1 win 17520 <nop,nop,timestamp 119747 15422>
21:42:05.976639 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: P 1:53(52) ack 1 win 17520 <nop,nop,timestamp 15422 0>
21:42:05.981029 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: P 1:52(51) ack 53 win 17520 <nop,nop,timestamp 119747 15422>
21:42:05.990079 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: P 53:685(632) ack 52 win 17520 <nop,nop,timestamp 15422 119747>
21:42:05.992275 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: P 52:684(632) ack 685 win 16888 <nop,nop,timestamp 119747 15422>
21:42:06.087181 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: . ack 684 win 17520 <nop,nop,timestamp 15422 119747>
21:42:06.087369 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: P 684:700(16) ack 685 win 17520 <nop,nop,timestamp 119747 15422>
21:42:06.121261 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: P 685:965(280) ack 700 win 17520 <nop,nop,timestamp 15422 119747>
21:42:06.300104 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: . ack 965 win 17520 <nop,nop,timestamp 119748 15422>
21:43:04.500967 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: P 700:972(272) ack 965 win 17520 <nop,nop,timestamp 119864 15422>
21:43:04.683560 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: . ack 972 win 17520 <nop,nop,timestamp 15539 119864>
21:43:25.303702 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: P 965:1733(768) ack 972 win 17520 <nop,nop,timestamp 15581 119864>
21:43:25.500135 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: . ack 1733 win 17520 <nop,nop,timestamp 119906 15581>
21:43:25.500720 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: P 1733:1749(16) ack 972 win 17520 <nop,nop,timestamp 15581 119864>
21:43:25.700155 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: . ack 1749 win 17504 <nop,nop,timestamp 119907 15581>
21:44:25.276498 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: P 972:988(16) ack 1749 win 17520 <nop,nop,timestamp 120026 15581>
21:44:25.278586 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: . ack 988 win 17520 <nop,nop,timestamp 15701 120026>
21:44:25.278855 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: P 988:1040(52) ack 1749 win 17520 <nop,nop,timestamp 120026 15581>
21:44:25.281295 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: P 1749:1801(52) ack 1040 win 17520 <nop,nop,timestamp 15701 120026>
21:44:25.283674 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: P 1040:1108(68) ack 1801 win 17520 <nop,nop,timestamp 120026 15701>
21:44:25.307113 brahma.giantfoo.org.ssh > vishnu.giantfoo.org.1008: P 1801:1877(76) ack 1108 win 17520 <nop,nop,timestamp 15701 120026>
21:44:25.500094 vishnu.giantfoo.org.1008 > brahma.giantfoo.org.ssh: . ack 1877 win 17520 <nop,nop,timestamp 120026 15701>
^C
--johan