From owner-freebsd-questions@FreeBSD.ORG Fri Dec 4 23:26:30 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C55B01065694 for ; Fri, 4 Dec 2009 23:26:30 +0000 (UTC) (envelope-from freebsd@optimis.net) Received: from mail.optimis.net (mail.optimis.net [69.104.191.124]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1E48FC0C for ; Fri, 4 Dec 2009 23:26:30 +0000 (UTC) Received: from marvin.optimis.net (marvin.optimis.net [192.168.1.3]) by mail.optimis.net (8.14.3/8.14.2) with ESMTP id nB4NQU0a092084; Fri, 4 Dec 2009 15:26:30 -0800 (PST) (envelope-from freebsd@optimis.net) Received: from marvin.optimis.net (localhost [127.0.0.1]) by marvin.optimis.net (8.14.3/8.14.3) with ESMTP id nB4NQT5W019283; Fri, 4 Dec 2009 15:26:29 -0800 (PST) (envelope-from freebsd@optimis.net) Received: (from george@localhost) by marvin.optimis.net (8.14.3/8.14.3/Submit) id nB4NQT3J019282; Fri, 4 Dec 2009 15:26:29 -0800 (PST) (envelope-from freebsd@optimis.net) Date: Fri, 4 Dec 2009 15:26:29 -0800 From: George Davidovich To: freebsd-questions@freebsd.org Message-ID: <20091204232629.GC18745@marvin.optimis.net> References: <560f92640912031516r7519dbb9x32e236b90f2b6508@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <560f92640912031516r7519dbb9x32e236b90f2b6508@mail.gmail.com> User-Agent: Mutt/1.5.19 (2009-01-05) Subject: Re: "Last login" message X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2009 23:26:30 -0000 On Thu, Dec 03, 2009 at 03:16:54PM -0800, Nerius Landys wrote: > When I ssh to my FreeBSD machine, I get something like this: > > Last login: Thu Dec 3 15:12:40 2009 from 11.22.33.44 > Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 > The Regents of the University of California. All rights > reserved. > > FreeBSD 7.1-RELEASE-p9 (DAFFY) #0: Thu Dec 3 11:33:28 PST 2009 > > ..where "11.22.33.44" is an IP address. However, sometimes, in place > of an IP address I get a truncated hostname, for example > "daffy.nerius.co" (note the last 'm' missing). I was wondering what > controls this, meaning if I get an IP or a hostname, and why it's > being truncated. If 'touch ~/.hushlogin' isn't what you're after, consider modifying sshd_flags in /etc/rc.conf. From sshd(8): -u len This option is used to specify the size of the field in the utmp structure that holds the remote host name. If the resolved host name is longer than len, the dotted decimal value will be used instead. This allows hosts with very long host names that over- flow this field to still be uniquely identified. Specifying -u0 indicates that only dotted decimal addresses should be put into the utmp file. -u0 may also be used to prevent sshd from making DNS requests unless the authentication mechanism or configuration requires it. Authentication mechanisms that may require DNS include RhostsRSAAuthentication, HostbasedAuthentication, and using a from="pattern-list" option in a key file. Configuration options that require DNS include using a USER@HOST pattern in AllowUsers or DenyUsers. I count 'daffy.nerius.co' as 15. -- George