Prevent SSH from disconnecting idle sessions

If you leave PuTTY connected for long periods of time on tail -f /some/log/file you may have noticed the SSH server disconnects you after a while if there is no new input on that log file.

You could configure PuTTY to enable connection keepalive functionality, but you’d need to either do that for every session or every saved server in the list. The easier way is to enable this functionality on the servers themselves…

Configure Munin to graph MySQL on CentOS 5/6 with Virtualmin

If you’re running a CentOS 5/6 VPS/Server with Virtualmin and installed Munin to graph the system stats, you’ll mostly likely notice that the generated graphs do not include MySQL.

This is expected behaviour since Virtualmin asks you to define a root password for your MySQL server (so it isn’t left unsecured out in the open), while Munin tries to read MySQL data using the root account and no password and fails.

But there’s an easy way to fix this…

Service management on the PI – chkconfig equivalent for Debian

Using the Debian based Rasbian (on my Raspberry PI), I recently need to turn some services off and then others on for startup. I knew how to do this on Redhat based distributions, but Debian does things differently.

Instead of chkconfig, Debian provides the update-rc.d utility to turn services on/off at specific runlevels…

Using rsync to syncronize files between two systems

Rsync is a very handy tool at synchronizing the contents of two folders/directories.

And while being great for local folders, it also works remotely, via SSH, thanks to the -e ssh parameter: # rsync -ave ssh sourceserver:/home/user/ /home/user will sync /home/user from the sourceserver with /home/user on the local machine.