Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2013 15:36:01 +0200
From:      aurikus grande <aurikus@gmail.com>
To:        freebsd-questions@FreeBSD.org
Subject:   how to log sshd access in a single file
Message-ID:  <CAPzqM6D=hy9P-N3TwLZQAbPp4bU_Sp57-LN-DmLaBkD_3jQSTg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

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 http://www.freebsd.org/doc/handbook/tcpwrappers.html, 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,
aurikus



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPzqM6D=hy9P-N3TwLZQAbPp4bU_Sp57-LN-DmLaBkD_3jQSTg>