How to link a SQL Server database to a Git repository using the SSH protocol

Applies to

ApexSQL Source Control


This article explains how to link a database to a Git repository using the SSH protocol generated by Putty


ApexSQL Source Control natively supports different protocols that can be used to connect to a Git repository. This includes HTTP, HTTPS, File and SSH protocols. In this article, we‘ll go through the process of generating a key pair using Putty and linking a database using the SSH protocol.

To generate a key, open Putty key generator. After the key is generated enter the Key passphrase and click the Save public key button to save a public key (, then click the Save private key button to save the private key (id_rsa.ppk):

Putty key generator

Default location for storing SSH keys is:


Created SSH keys on the default location

After this is done, from Putty key generator copy the generated key and store it on source control repository:

Copying the public SSH key

Now, for linking a database to the repository, under the System login tab, the SSH tab will be chosen and an SSH URL will be used:

SSH repository path for Git repository

Q: What is SSH?

A: SSH or Secure Shell is an encrypted network protocol used for secure communication over the internet.

Q: What source control systems is it used with?

A: ApexSQL Source Control supports SSH connections for Mercurial, Git and Subversion.

Q: What is the main advantage of SSH protocol?

A: Data sent via SSH is strongly encrypted and thus less susceptible to attacks.