"Last login" message
George Davidovich
freebsd at optimis.net
Fri Dec 4 23:26:30 UTC 2009
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 at HOST pattern in
AllowUsers or DenyUsers.
I count 'daffy.nerius.co' as 15.
--
George
More information about the freebsd-questions
mailing list