An SSH key allows you to log into your server without a password. This guide describes how to create SSH keys using a Linux, Mac, or Windows workstation in OpenSSH format, suitable for use with Vultr server instances.
OpenSSH is standard and should be present on macOS and most Linux distributions. We also have installation instructions for Windows 10 users. Follow these steps to create an SSH key with the OpenSSH utilities.
Generate your key with
ssh-keygen using these parameters:
$ ssh-keygen -t rsa -b 4096 -C "Example comment"
Press ENTER to save the key in the default location. By default, the keys are stored in the ~/.ssh directory. Using the default filename is convenient because most SSH clients automatically use the default filenames of id_rsa for the private key and id_rsa.pub for the public key.
Generating public/private rsa key pair. Enter file in which to save the key (/home/example_user/.ssh/id_rsa):
You may enter a passphrase for your key. We recommend using a passphrase, but you can press ENTER to bypass this prompt. If you use a passphrase, you will enter it each time you use the key unless you also use ssh-agent.
Enter passphrase (empty for no passphrase): Enter same passphrase again:
Your key is generated and saved.
Your identification has been saved in /home/example_user/.ssh/id_rsa. Your public key has been saved in /home/example_user/.ssh/id_rsa.pub. The key fingerprint is: SHA256:J3gbQu5GcqB8/9UXwhjYGXJrFSrb1jJJTEBwpaqF/p0 Example comment The key's randomart image is: +---[RSA 4096]----+ | .o=o= o. | | . O * | | . . + X | | . . = o * * | | o + O S O + . | | o O o * + . . | | o + . . . . | | o o o . | | . E | +----[SHA256]-----+
The default filename for the public key is /home/example_user/.ssh/id_rsa.pub on Mac and Linux, or C:\Users\example_user\.ssh\id_rsa.pub on Windows.
View the contents of the file.
Mac and Linux:
$ cat /home/example_user/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAA ... ... ... B31qRacQThmVw== Example comment
C:\> type C:\Users\example_user\.ssh\id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAA ... ... ... B31qRacQThmVw== Example comment
Copy the key to your clipboard if you want to add it to your Vultr account.
The OpenSSH client is an installable component for Windows 10 1809.
Once you've installed OpenSSH, follow the instructions above to create your SSH key.
PuTTYgen is part of the PuTTY suite of utilities. It is available for all versions of Windows.
For more information about managing SSH keys, see our other guides: