anomalous wtmp logging bug

Damien Miller djm at
Fri Mar 31 19:48:50 EST 2000

On Fri, 31 Mar 2000, Alex wrote:

> I've noticed rather strange wtmp logging behavior in sshd.  Can anyone
> confirm or solve the following: 
> Once a user authenticates themself to sshd, sshd among other things
> records the login in the wtmp, which `last` reads.  However, sshd
> logs hostnames which are longer than 16 characters instead of IPs
> like normal programs would.  As a result, I have useless entries
> such as:

OpenSSH logs both hostname and IP address if you wtmp supports it.
Under RedHat Linux I can get the IP addresses using "last -i". If
you would prefer IP addresses being logged instead of hostname, 
you may want to hack on login.c. grep for ut_host and ut_addr.


| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller -
| Email: djm at (home) -or- djm at (work)

More information about the openssh-unix-dev mailing list