INSTALLATION -------------------------------- In Ubuntu (debian) you need to install "libnotify-bin" to get the "notify-send" that is used for sending the messages on the client. On your client (your desktop machine) enter: sudo apt-get install libnotify-bin Then make the scripts executable: chmod u+x ./notify-remote.sh ./notify-remote NOTE -------------------------------- In the icons directory there are icons that are not used by the script yet. You can remove them if you want. The only ones that are used are the ones defined in the TRIGGER_ICONS array in the notify-remote.conf file. RUNNING -------------------------------- Start the script with: ./notify-remote host.example start|stop|empty-log Note for Ubuntu users: It is NOT recommended to empty the auth.log this way. The system handles the log rotation by it self. :) CONFIGURATION -------------------------------- An example host file exists in "./hosts/host.example". Just copy and edit it for each host you want notify-remote to connect to. Remember you will need passwordless login (key exchange) SSH setup for each host, see below how to do this in Ubuntu. You can also if you want edit the "./notify-remote.conf" file to make customizations. For the moment it's setup to monitor the auth.log file for the most important events. Costume icons: You can use your own "usericons" if you want. I have a server who my friends can access with SSH. I the "./icons/users" I have an icon for each user. Then you will see the icon for the user in the notify bubble. :) Supported format is jpg and png pictures. They have to be named as the user with .jpg or .png. If if your friends username is john then hes icon should be named "john.jpg" or "john.png" in the "./icons/users" folder. The user icon will be used when it can be matched to an action in the log. Otherwise the default in "./icons" icons will be used. You can change the default icons in the "notify-remote.conf" file as well. SETTING UP PASSWORDLESS LOGIN -------------------------------- Create a user on the remote server that should be used to monitor the auth.log file. If you have webmin installed, that's the easiest way. ex: "inspector" (needs to have access to a shell and be able to read the /var/log/auth.log file). On your client, create a RSA key pair using ssh-keygen. cd ~ ssh-keygen Leave everything default. Upload the public key to the server using scp. scp ~/.ssh/id_rsa.pub inspector@yourserver:~/ Add the key to authorized_keys Connect to the remote server using your new user. ssh inspector@yourserver cd ~ ls -la If you don't see a .ssh folder here, create one mkdir ~/.ssh Copy the key to the authorized_keys file. cat id_rsa.pub >> ~/.ssh/authorized_keys Remove the pub key. rm id_rsa.pub Enable key based authentication on the ssh server. Login on the remote machine as a user with root rights (sudo su). sudo su nano /etc/ssh/sshd_config Check so the following lines are active. RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile %h/.ssh/authorized_keys Save and exit. Reload the ssh configuration. /etc/init.d/ssh reload Logout from the server. Now it should be possible to login to the server from the client without using password. ssh inspector@yourserver AUTOSTART AT LOGIN IN UBUNTU -------------------------------- Go to "System" -> "Preferences" -> "Startup Applications". Click Add. Enter a name: Remote Notify - Your server name Command: /path-to-notify/notify-remote host.example start Comment: Start notify-remote for Your server. That's about it! :) Remember, this is just for view and fun, it's not a "security system"! Good luck!