Instructions for using Subversion over SSH in Windows

This article goes through step by step instructions on how to use Subversion over SSH in Windows. We are going to use TortoiseSVN in combination with SSH keys generated with Putty.

Prerequisites

In order to use subversion over SSH in Windows we are going to use TortoiseSVN application. You can download TortoiseSVN from their official site. We are also using Putty to generate a SSH key and handle communication with Helix TeamHub. You can download Putty from their official site. Download and install the Windows MSI installer package for Putty to have everything needed.

In order for TortoiseSVN to find Putty executables, you need to add the Putty install directory path to the Path variable. You can do this from the control panel. If you are using the Windows MSI installer package for Putty, this is done automatically at least for version 0.67.

In addition to having the aforementioned software installed, you should have a Helix TeamHub project and Subversion repository under it.

Configure TortoiseSVN to use SSH

Open TortoiseSVN settings from the start menu. Go to the Network tab, and setup TortoisePlink.exe as your SSH Client. You may find TortoisePlink.exe under bin directory from the TortoiseSVN installation directory, e.g. C:\Program Files\TortoiseSVN\bin.

TortoiseSVN settings in Network tab with SSH client configured

Generate SSH key with Putty

Generate the SSH key using PuttyGen. Use the default settings (SSH-2 RSA, 2048 bits). Save the private key to a directory of your choosing. Copy the Public key for pasting into OpenSSH authorized_keys file key into clipboard or to a file of your choosing. You need the public key in the next step.

PuttyGen generated SSH key

Copy the public key to Helix TeamHub user profile.

In Helix TeamHub, SSH keys are managed under user preferences. You may find user preferences by clicking the avatar icon top-right of the screen. Add public key to your preferences with a describing name.

Helix TeamHub user profile with add SSH key dialog

Make a PuTTY Session for the SSH Key

Open Putty from the start menu and copy the hth@hostname part of the SVN repository SSH clone URL to the hostname field. Omit the svn+ssh:// prefix and the path suffix. Write a descriptive name to the saved sessions field, and press save. If you are using the Helix TeamHub cloud instance for example, the configuration might look like the below.

Putty configuration with Helix TeamHub url configured

Next go to the Connection -> SSH -> Auth from the left sidebar, and add the private key you saved to Private key file for authentication. Go back to the Session from the left sidebar, select session you saved earlier and press save again.

Run Pageant to Activate the SSH Key

Start Pageant from the start menu and access it from system tray. Add the private key you generated earlier, and click close. Note that Pageant needs to be running when you are using TortoiseSVN with SSH protocol.

Checkout the repository

Next you can browse to a directory you wish to checkout your repository. You can copy-paste the clone url as it is directly from the Helix TeamHub web client. With the first checkout using a new SSH key, TortoiseSVN will ask to trust the host key.

Empty Subversion repository in Helix TeamHub with clone url open

Updated on: 12 September 2017