From owner-freebsd-questions@FreeBSD.ORG Wed Feb 20 10:27:39 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 747C6C0B for ; Wed, 20 Feb 2013 10:27:39 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-we0-x230.google.com (we-in-x0230.1e100.net [IPv6:2a00:1450:400c:c03::230]) by mx1.freebsd.org (Postfix) with ESMTP id D1E492E0 for ; Wed, 20 Feb 2013 10:27:38 +0000 (UTC) Received: by mail-we0-f176.google.com with SMTP id s43so6614216wey.35 for ; Wed, 20 Feb 2013 02:27:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=A9qbj0/dfQ6AAHIBzzQSPkFJeuVebxt27QmB9XquLRg=; b=KZimWjex+BZae5MJ/3yYS2iXJMraPNKNER1xLkbMiEfHTxbJLyvVZIvj8fPKCxYK4X ZaqoOgaZdpXTYw5pizxLCWi8NrxCgOggrOSRAkVq/U7xKGvbNhjS2kWDVMRrNErNOdvp 8MMRn5KGp7/sqW2TIe4tkfHx7g1PBYALMl9VR3uqfZcEjfPySca2ZIga0f35jNClVcB4 ziZI4exYYWcpEgLtfHzfKY+9tCWFDJ/IJ0lBARaEPo0M0OL/oWjMbAIjjoYfI7s04teW a+tYTe8raV13yo3IIxrSt6AiUcqtH5CbaxyPK2riJQ9kvGDQxFVAGts2l34BV3JS7uIU LLbQ== X-Received: by 10.194.76.137 with SMTP id k9mr32550847wjw.29.1361356057791; Wed, 20 Feb 2013 02:27:37 -0800 (PST) Received: from [192.168.0.13] (did75-17-88-165-130-96.fbx.proxad.net. [88.165.130.96]) by mx.google.com with ESMTPS id fg6sm32932609wib.10.2013.02.20.02.27.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Feb 2013 02:27:19 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: cannot ssh into a box with DHCP assigned IP address From: Fleuriot Damien In-Reply-To: <201302201021.r1KALCOR057657@mech-cluster241.men.bris.ac.uk> Date: Wed, 20 Feb 2013 11:27:15 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201302201021.r1KALCOR057657@mech-cluster241.men.bris.ac.uk> To: mexas@bristol.ac.uk X-Mailer: Apple Mail (2.1499) X-Gm-Message-State: ALoCoQnCRa1pzYdbeF7ji9XkV3A1mkRQ61BGQNnU0xyflbusa8QGln3Jk6CPvL2zb/OjlfS4MPge Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 10:27:39 -0000 Ok I think you've got a DNS resolution problem here, so when you try to = establish the connection, SSHD tries to resolve your client's hostname. It fails and times out, however your ssh login gracetime is already = over. You have several options here: 1/ increase the login grace time in sshd_config 2/ set usedns no (or do both, btw) 3/ fix DNS resolution ;) I would definitely recommend turning off hostname resolution for sshd, = it is of marginal value (to me at least). On Feb 20, 2013, at 11:21 AM, Anton Shterenlikht = wrote: > =46rom ml@my.gd Wed Feb 20 10:11:12 2013 >=20 > Run this on your server: >=20 > tcpdump -ni wlan0 ip and port 22 >=20 > Then try to ssh to the box, > see if SYN packets arrive, > see if your box sends SYN/ACK back. >=20 > 172.21.220.12 is the ssh server > 137.222.187.241 is the ssh client (where I login from) >=20 > There's lots of output on the server: >=20 > 10:13:40.396933 IP 172.21.220.12.20541 > 137.222.187.241.22: Flags = [P.], seq 528 > :576, ack 897, win 1040, options [nop,nop,TS val 166697722 ecr = 2764601194], leng > th 48 > 10:13:40.400142 IP 137.222.187.241.22 > 172.21.220.12.20541: Flags = [P.], seq 897 > :945, ack 576, win 1040, options [nop,nop,TS val 2764601829 ecr = 166697722], leng > th 48 > 10:13:40.499768 IP 172.21.220.12.20541 > 137.222.187.241.22: Flags = [.], ack 945, > win 1040, options [nop,nop,TS val 166697825 ecr 2764601829], length 0 > 10:13:41.126804 IP 172.21.220.12.20541 > 137.222.187.241.22: Flags = [P.], seq 576 > :624, ack 945, win 1040, options [nop,nop,TS val 166698452 ecr = 2764601829], leng > th 48 > 10:13:41.129465 IP 137.222.187.241.22 > 172.21.220.12.20541: Flags = [P.], seq 945 > :993, ack 624, win 1040, options [nop,nop,TS val 2764602558 ecr = 166698452], leng > th 48 > 10:13:41.229792 IP 172.21.220.12.20541 > 137.222.187.241.22: Flags = [.], ack 993, > win 1040, options [nop,nop,TS val 166698555 ecr 2764602558], length 0 > 10:14:06.042148 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [P.], seq 691 > 166491:691166555, ack 2147595671, win 1040, options [nop,nop,TS val = 2121228740 e > cr 166423364], length 64 > 10:14:06.043854 IP 172.21.220.12.46009 > 137.222.187.241.22: Flags = [P.], seq 1:3 > 3, ack 64, win 1040, options [nop,nop,TS val 166723368 ecr = 2121228740], length 3 > 2 > 10:14:06.144924 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [.], ack 33, > win 1040, options [nop,nop,TS val 2121228843 ecr 166723368], length 0 >=20 > 10:15:02.017361 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [P.], seq 159 > 04:16240, ack 7169, win 1040, options [nop,nop,TS val 2121284715 ecr = 166779337], > length 336 > 10:15:02.017969 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [P.], seq 162 > 40:16576, ack 7169, win 1040, options [nop,nop,TS val 2121284716 ecr = 166779337], > length 336 > 10:15:02.018079 IP 172.21.220.12.46009 > 137.222.187.241.22: Flags = [.], ack 1657 > 6, win 1035, options [nop,nop,TS val 166779343 ecr 2121284715], length = 0 > 10:15:02.018319 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [P.], seq 165 > 76:16896, ack 7169, win 1040, options [nop,nop,TS val 2121284716 ecr = 166779337], > length 320 > 10:15:02.018510 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [P.], seq 168 > 96:17232, ack 7169, win 1040, options [nop,nop,TS val 2121284716 ecr = 166779337], > length 336 > 10:15:02.018626 IP 172.21.220.12.46009 > 137.222.187.241.22: Flags = [.], ack 1723 > 2, win 1030, options [nop,nop,TS val 166779344 ecr 2121284716], length = 0 > 10:15:02.019583 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [P.], seq 172 > 32:17568, ack 7169, win 1040, options [nop,nop,TS val 2121284716 ecr = 166779337], > length 336 > 10:15:02.019840 IP 137.222.187.241.22 > 172.21.220.12.46009: Flags = [P.], seq 175 > 68:17840, ack 7169, win 1040, options [nop,nop,TS val 2121284717 ecr = 166779337], > length 272 > 10:15:02.019927 IP 172.21.220.12.46009 > 137.222.187.241.22: Flags = [.], ack 1784 > 0, win 1036, options [nop,nop,TS val 166779345 ecr 2121284716], length = 0 >=20 > Thanks >=20 > Anton