Generating SSH key pair on Microsoft Windows
You can use PuTTY to generate your SSH key. PuTTY is a free open-source terminal emulator that functions much like the Terminal application in Mac OS X in a Windows environment.
- Please download PuTTYgen program by using this link.
- Open the PuTTYgen program.
- For Type of key to generate, select RSA.
- Click the Generate button.
- Move your mouse in the area below the progress bar. When the progress bar is full, PuTTYgen generates your key pair.
- OPTIONAL: Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.
- You will need PRIVATE KEY to connect to your machine. Warning! You must save the private key.
- Click the "Save private key" button to save the private key.
- PUBLIC KEY shall be uploaded using Web UI of DataLab.
-
Do not use "Save public key" button for saving public key.
To save public key in a proper format you have to copy all text from "Public key for pasting into OpenSSH
authorized_keys" field, create new textfile and paste this text in it, then save the file in format file_name.pub
How to convert key.pem to key.ppk
- Open the PuTTYgen program.
- Select RSA.
- Click the Load button.
- Choose your key.pem.
- OPTIONAL: Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.
- Click the "Save private key" button to save your private key.
You can use Cygwin if you want for SSH key generation. In order to generate key using Cygwin please follow these steps:
- Open Cygwin shell.
- Enter ls -al ~/.ssh to see if existing SSH keys are present
- Enter following command and write appropriate email address:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
- When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.
- At the prompt, type a secure passphrase.
Generating SSH key pair on MAC OS / Linux
- Open Terminal.
- Enter following command and write appropriate email address.
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
- This creates a new ssh key, using the provided email as a label.
Generating public/private rsa key pair.
- When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.
Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
- At the prompt, type a secure passphrase.
Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again]