|
You should check for existing SSH keys on your local computer. If you already have a key pair that you want to use, you can go to step 4.
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 |
Now generate a new SSH key.
If you don't have an existing SSH key to use, you need to generate one.
Open a terminal on your local computer and enter the following:
ssh-keygen |
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:

In your terminal, copy the public key file to your clipboard by entering:
pbcopy < ~/.ssh/id_rsa.pub |
sudo apt-get install xclip xclip -sel clip < ~/.ssh/id_rsa.pub |
Note that on Linux, you may need to download and install xclip, as shown in the code snippet above.
In Stash, go to your profile:![]()