creating_ssh_key_pairs_on_mac.md
title = "Creating SSH key pairs on Mac"
description = "How to create key pairs for use with Anvil on Mac"
To create SSH key pairs on Mac, the built-in Terminal application is used, which is located in the Utilities folder under Applications.
{{< figure src="/images/13598866.png" width="598" height="67" >}}
Start Terminal and run the
command ssh-keygen -m PEM -f ~/Desktop/anvil_key
. This will create two key
files on your Desktop, one public and one private, which can later be
moved to whatever location you prefer.
{{< figure src="/images/13598870.png" >}}
A prompt will appear to enter a passphrase. Press Enter twice to continue and create the key without a passphrase.
{{< figure src="/images/13598876.png" >}}
{{< figure src="/images/13598877.png" >}}
The command will complete and you will see a message saying the files have been created.
{{< figure src="/images/13598880.png" >}}
There will now be two key files on your Desktop. The public key is
named anvil_key.pub
. This public key will later be added to your
Anvil account for SSH access to your instances. The private key is
named anvil_key
(no .pub extension). Treat the private key file the
same as you would a password. Keep your private key in a secure
location and do not share it with anyone.