I need to keep track of all
SSH
connections on my server. In my /etc/hosts.allow
I have something like this:
sshd: ALL : spawn ( echo "date
from %u %a " >> /var/log/ssh/%d.log ) &
where %a
logs the client IP, and %u
is supposed to log the username. But instead %u
just logs unknown
. Is there a way to fix this? I need to log both the IP and the username for each connection.
Asked by Martin Vegter
(586 rep)
Sep 17, 2013, 06:18 AM
Last activity: Sep 17, 2013, 06:39 AM
Last activity: Sep 17, 2013, 06:39 AM