How to generate SSH keys
How to Generate SSH Keys on Linux, macOS, and Windows
Generate an SSH Key
Follow these steps to create an SSH key on your local machine. If you already have an SSH key, skip to Add Your SSH Key.
Linux & macOS
Open Terminal.
Run the command below, replacing your email:
This creates a new SSH key with your email as a label.
When prompted to enter a file location, press Enter to use the default path. If an existing key is detected, you can create a custom-named key instead.
Set a secure passphrase when prompted.
Adding Your SSH Key to the ssh-agent (optional)
ssh-agent
is a built-in program in Linux and macOS. It is a background process that manages SSH keys and their passphrases, so you don't have to enter the passphrase every time you use SSH.
Start the ssh-agent:
If using macOS 10.12.2 or later, update your
~/.ssh/config
file:Add the following:
Add your private key to the ssh-agent:
Windows
Add Your SSH Key to Zeupiter
Last updated
Was this helpful?