Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Your turn: Setting up SSH

Now it's your turn to try creating an SSH key and putting it on GitHub.

There are many ways of making version control secure but not difficult or time-consuming to access for the people who use it every day.

Now it’s your turn to try creating an SSH key and putting it on GitHub. If you are using a computer which is not your own, please ensure you have permission to do this. You will also need command line access – this will not be possible on smartphones or tablets.

The process to make an SSH key is very simple. Most operating systems come with a pre-installed SSH feature as it is used for lots of different purposes, so you should not need to install anything.

Create an SSH Key

Open a window of command prompt, Terminal or Powershell and type:
ssh-keygen
This should give you the option to:
  • change the name or location of your keys – this should be id_rsa
  • put a password on your key.

You might be wondering why you would put a password on something which replaces your password? This is usually done when multiple people might share a single computer.

It is up to you whether you choose to add a password – for the sake of speed and convenience, most programmers prefer to not use a password. Note that there is no way to change or reset your password, so if you forget it, you have to regenerate and replace the key.

Your SSH key will automatically be put into a hidden folder called ‘.ssh’. You should be able to access this by entering the following command:

cd ~/.ssh

This will take you to the hidden folder, where you can use the command:

cat id_rsa.pub

Which will show your public key on your screen – you can use your mouse to select and copy this using Ctrl + c, and then paste it into the GitHub website under the ‘SSH/GPG Keys’ tab in settings – check out the video again if you need help finding it.

This article is from the free online

Working with Version Control

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now