Creating an SSH key pair

Creating an SSH key pair from linux

Ensure you are currently using the user account which will be using the SSH connection

  • Run the command below and press enter until it has completed
ssh-keygen -t rsa
  • By default your private and public key will be stored in ~/.ssh/
cat ~/.ssh/id_rsa.pub

Creating an SSH key pair from Windows

  • Firstly, download and install putty from Here
  • Now type puttygen in your start menu and launch the program
  • Ensure SSH-2 RSA is selected at the bottom of the screen and click generate. Move your mouse around in the box in the middle to generate some randomness
  • Save your private key as [yourname].ppk in your documents in a directory called ssh-key.
  • Save your public key as [yourname].txt in your documents in the same directory.

Any comments or questions? Get in touch here or Email me at [email protected]