I just installed DietPI in my newly acquired Raspberry Pi 2, due to it’s amazing setup, functionalities, small size and footprint, and am loving it because it was precisely what I needed (great job!).
I was looking around for a way to log SSH connections/tries and implementing an IP blocking system and email notification, since I intend to have it accessible outside my local network, but, as far as I’ve seen, this is impossible with DropBear.
Is there a way I can do this with OpenSSH or through another method?
(I’m sorry if this was already asked/done, but the Forum search tool blocked every word I tried to use )
You will need to install OpenSSH server for your requirements. Also, i believe OpenSSH logs relies on syslog. So you will need to change your logging mode to “full”. Once completed, the log file should be in /var/log/auth.log
Simply use DietPi-Software to change both your SSH server and Logging mode choices.
The OpenSSH server config is located here:
/etc/ssh/sshd_config