Here follows a solution for a convenient and secure way of allowing other machines to connect to the Bazaar repository on my server via SSH and key authentication. I only want to allow Bazaar commands and not any other. This setup should be easy to adapt for Git and Mercurial (hg) or any other application that sends command via SSH.
This post assumes that you are familiar with the unix command line. If you are not then I recommend the video from Addison Berry session “The command line is your friend” from DrupalCon Copenhagen 2010. I have something of a passion/obsession with removing annoying obstacles in my every day tasks.