How to create an SSH Key
Create SSH Key from a Linux machine
In order to create a SSH key pair in Linux it is recommended to use a command “ssh-keygen”. If your system does not have openssh-client installed, please install it with the latest updates using this command (for Ubuntu and Debian family):
sudo apt-get update && apt-get install openssh-client
sudo yum install openssh-clients
(for CentOS and Red Hat).
After that, in terminal please enter command: (this will create new SSH Key in the location where you are currently)
ssh-keygen -f <name of an SSH Key>
Application will ask you for the passphrase (you can leave it empty - pressing enter will create SSH Key without passphrase):
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in first_key
Your public key has been saved in first_key.pub
To avoid problems with rejecting files because of too opened permissions simply change permissions for the key files:
chmod 600 <name of the private key> && chmod 600 <name of the public key>
Create SSH Key from a Windows Machine
To create a SSH key pair in Windows it is recommended to install puttyge.exe application using this link.
After installation please run puttygen.exe, pick RSA type of key and select “Generate”:
Next, move the mouse cursor randomly over the blank area below the loading bar:
You will obtain the following screen with your public key:
Copy and paste it to Notepad from which you can save it to your preferred location with .pub extension.
Now, in PuTTy select “save private key” and save it to your preferred location.