1. Launch the Terminal app on your Mac
Press CMD + spacebar on your Mac to launch ‘Spotlight Search’, then type ‘Terminal’ and press enter.
2. Generate your key
Type in the exact command on your terminal window:
ssh-keygen -t rsa
It will then ask you to enter which file to save the key in, you can press ‘Enter’ here and it will accept the default path.
![](https://docs.mightybox.io/wp-content/uploads/2023/08/gen-key-1-1024x627.png)
Next, it will ask you to enter a passphrase. You can press ‘Enter’ here again to skip adding a passphrase.
![](https://docs.mightybox.io/wp-content/uploads/2023/08/gen-key-2-1024x632.png)
3. View and copy your public key
To view and copy your generated public key, enter the command cd .ssh
and then ls
![](https://docs.mightybox.io/wp-content/uploads/2023/08/gen-key-3-1024x180.png)
You’ll see two files listed as ‘id_rsa’.
The id_rsa file is your private key (we recommend not to share or upload anywhere) and the id_rsa.pub is your public key and what we want to copy.
Enter the command cat id_rsa.pub
and select your public key and copy it to your clipboard.
![](https://docs.mightybox.io/wp-content/uploads/2023/08/gen-key-4-1024x260.png)
4. Add your public key to MightyBox Settings
If you are unsure how to add your SSH key to MightyBox, click here to learn how.