With the following script we monitor the SSH login on a server and send a notification via Telegram API.
This way you will get a notification in real time when someone logs in to your server via SSH. For me this is a valuable security feature.
If you want to log the output of an SSH connection under macOS with pssh from Homebrew, the following error occurs:
line buffering (buffering=1) isn't supported in binary mode