[Other doc versions]
[Doc downloads]
This page describes how to create SSH keys.
SSH keys can be used to establish a secure connection with Stash for:
The SSH key needs to be added to Stash, and your Stash administrator must have enabled SSH access to Git repositories, before you can make use of the key.
Supported key types are DSA and RSA2 – RSA1 is not supported.
You can use an existing SSH key with Stash if you want, in which case you can go straight to either SSH user keys for personal use or SSH access keys for system use.
You should check for existing SSH keys on your local computer. You can use an existing SSH key with Stash if you want, in which case you can go straight to either SSH user keys for personal use or SSH access keys for system use.
Open a command prompt, and run:
cd %userprofile%/.ssh
If you see "No such file or directory", then there aren't any existing keys: go to step 3.
Check to see if you have a key already:
dir id_*
If there are existing keys, you may want to use those: go to either SSH user keys for personal use or SSH access keys for system use.
If you have existing SSH keys, but you don't want to use them when connecting to Stash, you should back those up.
In a command prompt on your local computer, run:
mkdir key_backup copy id_rsa* key_backup
If you don't have an existing SSH key that you wish to use, generate one as follows:
In a command prompt, run:
ssh-keygen -t rsa -C "your_email@example.com"
Associating the key with your email address helps you to identify the key later on.
Note that the ssh-keygen
command is only available if you have already installed Git (with Git Bash).
You'll see a response similar to this:
.ssh
directory doesn't exist, the system creates one for you.Enter, and re-enter, a passphrase when prompted. The whole interaction will look similar to this:
You're done! Now go to either SSH user keys for personal use or SSH access keys for system use.
You should check for existing SSH keys on your local computer. You can use an existing SSH key with Stash if you want, in which case you can go straight to either SSH user keys for personal use or SSH access keys for system use.
Open a terminal and run the following:
cd ~/.ssh
Check to see if you have a key already:
ls id_*
If you have existing SSH keys, but you don't want to use them when connecting to Stash, you should back those up.
Do this in a terminal on your local computer, by running:
mkdir key_backup cp id_rsa* key_backup
If you don't have an existing SSH key that you wish to use, generate one as follows:
Open a terminal on your local computer and enter the following:
ssh-keygen -t rsa -C "your_email@example.com"
Associating the key with your email address helps you to identify the key later on.
You'll see a response similar to this:
.ssh
directory doesn't exist, the system creates one for you.Enter, and re-enter, a passphrase when prompted.
The whole interaction will look similar to this: