Generating and using an SSH key (Windows, macOS and Linux)
With an SSH key you log in via SSH without a password. You create a key pair: the private part stays on your own computer, the public part goes on your hosting package or Managed VPS.
Generating a key in Windows
Install PuTTY
Download PuTTY and install it. PuTTYgen comes with it.
Open PuTTYgen
Search the Start menu for PuTTYgen and open it.
Choose the type of key
At the bottom, under Type of key to generate, choose RSA.
Generate the key
Click Generate and move your mouse over the window until the progress bar is full.
Choose a password for the key
Enter a password of your choice under Key passphrase and Confirm passphrase.
Save the private part
Click Save private key and choose a file name. This file stays on your computer.
Copy the public part
Right-click in the field Public key for pasting into OpenSSH authorized_keys file, choose Select All and then Copy.
Using a key in Windows
Open PuTTY
Search the Start menu for PuTTY and open it.
Open the key settings
On the left, under Connection, click the plus sign next to SSH, then the plus sign next to Auth, and then Credentials.
Choose your private key
Under Private key file for authentication, click Browse and choose the file you saved when generating the key.
PuTTY now uses the key when you start an SSH session. Then, on the left under Session, enter the server name under Host Name and the port of your package under Port; you can read which these are at the bottom of this article.
Generating a key in macOS or Linux
Open the Terminal
On macOS, search for Terminal with Spotlight (the magnifying glass at the top right). On Linux, open your distribution's terminal.
Start generating
Type this command and press Enter:
ssh-keygen -t rsaChoose the storage location
Press Enter to use the default location.
Choose a password for the key
Enter a password (passphrase) and confirm it. It is not required, but strongly recommended.
Show the public part
Type this command and press Enter:
cat ~/.ssh/id_rsa.pubYou now see the public part of the key. That is what you put on your package.
Related articles
Thank you for your feedback.

