This article describes how to configure SSH on a Ketura server so that Ketura can communicate with Subversion using the svn+ssh protocol. The information here is not required or relevant if you are using one of the other Subversion protocols (HTTP, HTTPS, svn) to integrate Ketura and Subversion.
The rest of this article assumes a significant degree of familiarity with both Subversion and SSH. If you are new to either of these technologies, it is recommended that you instead configure Ketura to connect to Subversion using the HTTP, HTTPS or svn protocol.
Ketura can integrate with Subversion via several different protocols, including svn+ssh. The svn+ssh protocol uses SSH as the underlying transport and, unlike the other supported Subversion protocols, requires some additional configuration outside Ketura for it to work.
The Ketura server runs using a particular operating system user account. On Windows, Ketura runs as the system user; on Mac OS X, it runs as a user named ‘araxisketura’. Ketura issues any commands to SCM systems using this same account, and it will therefore also be used to open SSH connections when Ketura is configured to integrate with an SCM system of the type Subversion (SSH).
Ketura avoids the potential for extremely complex SSH configurations by supporting only one scenario for communicating via Subversion’s svn+ssh protocol. Ketura therefore mandates that SSH be configured to authenticate using a public-private key pair, with the private key not being password protected.
To maintain reasonable security, the private key file must have its permissions set so that it is readable only by the Ketura server’s user account (the system account on Windows, or ‘araxisketura’ on Mac OS X). It is also recommended that the SSH account used by Ketura on the Subversion server be configured with read-only access to the relevant repositories.
SSH configuration for both Mac OS X and Windows
To configure SSH on your Ketura server so that Ketura can use it to communicate with Subversion:
Ensure that your Subversion server is configured to permit SSH connections.
Create a new operating system user account on the Subversion server machine for use by Ketura to access Subversion. As a security precaution, it is sensible to limit this user to read-only access to your Subversion repository.
Generate a public-private key pair, without a passphrase, for this account. Ketura will use the private key to authenticate its SSH connections with the machine hosting the Subversion server. Key pair generation can be carried out on either machine but, if you do it on the machine hosting Ketura, you can avoid transferring the private key across a network.
The generated private key must not have a passphrase, otherwise Ketura will be unable to use it to open an SSH connection. See the documentation of your SSH implementation for details concerning the generation of public-private key pairs.
On the machine hosting the Subversion server, append the contents of the public key file to the
authorised_keysfile in the SSH configuration directory of the new SSH user that you created earlier.
See the relevant Further SSH configuration section below to ensure that the generated private key file is available to the Ketura user account.
The precise steps required will depend upon the SSH implementation that you are using on the machine hosting Ketura. On Mac OS X, SSH client-side support is provided with the operating system. On Windows, SSH client-side support is typically provided using the PuTTY suite of SSH client tools. The Subversion client can be configured to use PuTTY’s
plink.exetool to open SSH connections to the Subversion server.
Further SSH configuration for Mac OS X
To make the private key file available on Mac OS X:
Run the following commands in a Terminal window:
cd /Library/Araxis/Ketura sudo mkdir -p .ssh sudo chown araxisketura:araxisketura .ssh sudo chmod 700 .ssh
Move the private key file you generated earlier (most likely
id_dsa) into the
Run the following commands in a Terminal window:
sudo chown araxisketura:araxisketura /Library/Araxis/Ketura/.ssh/<private-key-file>< sudo chmod 600 /Library/Araxis/Ketura/.ssh/<private-key-file> sudo -u araxisketura ssh <ssh-user>@<subversion-host>
is the name of your private key file; is the name of the SSH user account you have created for Ketura on your Subversion server; is the hostname of your Subversion server.
If prompted, verify the fingerprint of the Subversion host and confirm to continue.
- Log out of your SSH session by pressing Ctrl+D.
Further SSH configuration for Windows
To configure PuTTY for Ketura:
Log on as a Windows system administrator to the machine running the Ketura server.
puttygen.exetool. This will be used to convert the private key you generated earlier into PuTTy’s own format for private keys.
Under the Conversions menu, select Import key. The key will be imported.
Click the Save private key button to save the private key to a
.ppkfile. If a warning is shown asking whether you want to save the key without a passphrase, click the Yes button. When saving the file, select a location that can be accessed by the Windows system user and administrators only, such as
C:\WINDOWS\system32\config\systemprofile\Application Data\PuTTY\keys\on Windows XP and Windows Server 2003, or
C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\PuTTY\keys\on Windows Vista and later. You will need to create the
keysdirectories before saving the file.
Run the the
putty.exetool. This will be used to create a saved session to the machine hosting your Subversion server.
Under the Session category, set the Host Name field to the address of the machine hosting the Subversion server.
Check that the selected protocol is SSH.
Under the Connection▸SSH▸Auth category, add the full path of the
.ppkfile that you created earlier.
Return to the Session category, enter a name in the Saved Sessions field before clicking the Save button.
At this point, it should be possible to use
putty.exeto open an SSH connection to the machine hosting Subversion. In
putty.exe, select the session that you created and click the Open button.
A PuTTY terminal should open and a dialog will appear, asking you to add the server’s host key to the registry. Click the Yes button to continue.
Log out of your SSH session by pressing Ctrl+D.
Recall that Ketura runs as the non-login system user. The saved SSH session that you have just created using PuTTY must therefore be made available to this user. Because PuTTY stores its settings in the Windows registry, this requires manipulation of the registry. The next few steps will guide you through this process.
Launch the Windows registry editor (
Navigate to the key
HKEY_CURRENT_USER\Software\SimonTatham\PuTTYand export it to a file on your desktop.
Open the exported file in a text editor and replace every instance of
Save the file.
In Windows Explorer, double-click the registry file on your desktop. This will merge the file’s contents into the registry.
Subversion must be configured to use PuTTY’s
plink.exetool for establishing SSH connections. If this has not already been done, open the Subversion
configfile for the System user account. This file will typically be located at
C:\WINDOWS\system32\config\systemprofile\Application Data\Subversion\configon Windows XP and Windows Server 2003, or at
C:\Windows\system32\config\systemprofile\AppData\Roaming\Subversion\configon Windows Vista and later.
Find the section labelled ‘[tunnels]’ and add the following line beneath it:
ssh = $SVN_SSH "C:/Program Files/PuTTY/plink.exe" -ssh -batch
C:/Program Files/PuTTY/is the location of your PuTTY installation.
To configure Ketura to connect to a Subversion server using SSH:
Log onto Ketura as an administrator.
Add a new SCM System for your SSH Subversion server. Choose Subversion (SSH) as the Type and enter Unused for the Username field. Leave the Password field blank.
Due to the way Subversion uses SSH, the name of the SSH user account you created on the Subversion server must be provided in the Server address field. The value has syntax:
For example, you might enter:
email@example.com/repos/ If using a saved PuTTY session on Windows, specify the name of of the saved session in place of the server and port.