Skip to main content
  1. Learn
  2. Software Development
  3. Guides
  4. Git tutorial
  5. Git commands & settings
  6. SSH connection settings
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

SSH connection settings

Secure Shell (SSH) provides a secure and efficient way to establish a connection between your local machine and remote Git repositories. By leveraging SSH connection settings, you can enhance the security of your Git workflow and streamline your collaboration efforts.

In this section, we will explore the process of setting up and configuring SSH connections for Git. We will guide you through generating SSH keys and configuring your local Git client to use SSH for remote operations.

By understanding and implementing SSH connection settings, you will strengthen your authentication mechanisms, eliminate the need for repetitive password prompts, and enable efficient collaboration with your team members. Moreover, using SSH ensures that your Git commands and data remain secure during transfers, providing peace of mind for your development projects.

Explore SSH connection settings and unlock the power of secure and efficient Git collaboration.


Set up SSH connection (Windows)

Go to Start menu > All Programs > Open TortoiseGit and start Putty Key Generator.

Open TortoiseGit items and run Puttygen

Click on “Generate” and move the mouse cursor within the red frame until the progress bar completes. This will randomly generate a key.

Until the progress bar reaches the right corner, you move the mouse with the red-framed area

When the key generation is complete, you will see the following display. Click “Save private key” and save the “.ppk” file.

Save the ppk file by clicking the "Save private key" button.

You can view the public key again in the future by loading the “.ppk” file into Putty Key Generator.

In order to configure SSH connection when we push with TortoiseGit, right-click on TortoiseGit, then choose “Manage.”

If you click TortoiseGit, the following screen will be displayed. Then, click Manage button

With “origin” selected in the remote column, add the SSH path to the URL field, and add the “.ppk” file path that we have just saved to the Putty Key field. Click “Add New/Save.” Now, the origin remote that is associated with the SSH URL path will be added to the list of remote in this repository. Click “OK” to complete.

Assign the ppk file that you just saved to the Putty authentication, and then click Add New/Save button

Set up SSH connection (Mac)

Open terminal under application/utility and execute the following command.

$ ssh-keygen

You will see the following output. You may optionally enter the passphrase for this generated RSA key pair.

Continue by hitting enter if you do not wish to set a passphrase.

Generating public/private rsa key pair.
  Enter file in which to save the key (/Users/username/.ssh/id_rsa): <Press Enter key>
  Created directory '/Users/username/.ssh'.
  Enter passphrase (empty for no passphrase): <Input passphrase>
  Enter same passphrase again: <Please enter the same passphrase again>
  Your identification has been saved in /Users/username/.ssh/id_rsa.
  Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
  The key fingerprint is:
  57:15:3c:ca:f2:dc:27:6d:c2:9a:88:d0:70:cf:8d:31 username@username-example-device
  The key's randomart image is:
  +--[ RSA 2048]----+
  |             .o. |
  |             .o  |
  |           ... . |
  |      . . E.o    |
  |       +So.O o . |
  |      . ..+ + = +|
  |       . . . o = |
  |        . . o    |
  |                 |
  +-----------------+

You can view the public SSH key with the following command.

$ cat ~/.ssh/id_rsa.pub

Output example

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkkJvxyDVh9a+zH1f7ZQq/JEI79dVjDSG
  4RzttQwfK+sgWEr0aAgfnxdxQeDKxIxqI1SwyTY8oCcWzvpORuPqwbc7UWWPcCvbQ3jlEdN
  5jvwKM82hincEWwI3wzcnVg2Mn8dH86b5m6REDzwRgozQ3lqrgwGVlTvkHDFs6H0b/1PSrM
  XGppOP/QXGEVhZ6Hy4m3b1wMjjrbYwmWIeYklgoGHyrldhAaDYc33y7aUcRyFyq5DubtsLn
  2oj4K+1q36iviCHxCOri0FDmn2dzylRCI4S+A2/P7Y7rVfdT+8OWYKCBUs8lfjujghEtejq
  Qmj9ikyGTEAW1zQCN7hVwYdjL hoge@hoge.local

Copy and paste this key into the remote repository settings.

Set up SSH connection (Console)

Execute the following command.

$ ssh-keygen

You will see the following output. You may optionally enter the passphrase for this generated RSA key pair. Hit enter if you do not wish to set a passphrase.

Generating public/private rsa key pair.
  Enter file in which to save the key (/Users/username/.ssh/id_rsa): <Press Enter key>
  Created directory '/Users/username/.ssh'.
  Enter passphrase (empty for no passphrase): <Input passphrase>
  Enter same passphrase again: <Please enter the same passphrase again>
  Your identification has been saved in /Users/username/.ssh/id_rsa.
  Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
  The key fingerprint is:
  57:15:3c:ca:f2:dc:27:6d:c2:9a:88:d0:70:cf:8d:31 username@username-example-device
  The key's randomart image is:
  +--[ RSA 2048]----+
  |             .o. |
  |             .o  |
  |           ... . |
  |      . . E.o    |
  |       +So.O o . |
  |      . ..+ + = +|
  |       . . . o = |
  |        . . o    |
  |                 |
  +-----------------+

You can view the public SSH key with the following command.

$ cat ~/.ssh/id_rsa.pub

Output example

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkkJvxyDVh9a+zH1f7ZQq/JEI79dVjDSG
  4RzttQwfK+sgWEr0aAgfnxdxQeDKxIxqI1SwyTY8oCcWzvpORuPqwbc7UWWPcCvbQ3jlEdN
  5jvwKM82hincEWwI3wzcnVg2Mn8dH86b5m6REDzwRgozQ3lqrgwGVlTvkHDFs6H0b/1PSrM
  XGppOP/QXGEVhZ6Hy4m3b1wMjjrbYwmWIeYklgoGHyrldhAaDYc33y7aUcRyFyq5DubtsLn
  2oj4K+1q36iviCHxCOri0FDmn2dzylRCI4S+A2/P7Y7rVfdT+8OWYKCBUs8lfjujghEtejq
  Qmj9ikyGTEAW1zQCN7hVwYdjL hoge@hoge.local

Copy and paste this key in the remote repository setting.

Register SSH public key to Backlog

Login to Backlog with your account username that has access to the Git repository. Once logged in, click on “Personal Settings.”

Click "Personal setting"

Click “Register SSH public key.”

Click "Register SSH public key"

Paste the SSH public key into the text area and click “Submit.”

Paste the content of SSH public key and click "Register" button

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life