how to log sshd access in a single file

aurikus grande aurikus at
Mon Sep 16 13:36:03 UTC 2013


just a few days ago i setup my first FreeBSD server, so i am new to this OS.

I already tried to find the information i was looking for, but to no luck.

I try to add a line in /etc/hosts.allow which would allow and log all
attempts using SSH (sshd).

I found, which
mentions twist as the only way to accomplish this.

So i created a line in allow.hosts which reads as follows:

sshd : ALL : twist /bin/echo "a% from h% attempted to acces d%" >> \
      \var\log\ssh-connections.log : allow

sshd for the service
ALL for all ip-addresses
allow to allow access
and the text in between should make sure that the file ssh-connections is
being updated.

The file already exists, i used root access to create it.

But it does not work as expected.

Could you please point me where i did it wrong.

Thanks in advance for your help.

Best regards,

More information about the freebsd-questions mailing list