Clone a git repo using a specific SSH private key

If you wish to clone a repo using a set private key, you can use the following syntax to do just that and it won’t add the private key to your usual SSH settings:


Generating Public & Private Keys Using PHPSECLIB

A few tasks that I’ve been working on this weekend have needed public/private key pairs. The very useful phpseclib library provides the tools that you need to generate these within your application.


Linux Server: Send Email on File Change

This script will send an email when a file changes in the given path. Can’t remember where I picked this up from but it’s useful to have when you need to debug something that writes files.


Outbound FTP Issues with Virtualmin

If you’re a Virtualmin user and use the iptables based firewall, you may have issues with outbound FTP working. The FTP connection can often be made, but then stalls at receiving data.

You can fix this by adding the nf_conntrack_ftp module to your machine. As root or sudo bash, create the following file:

and within that file put:

This will make sure that module gets loaded after each boot and fix your connection issue.