Create an SSH Key (Mac OS X)
You can log in to your servers using SSH keys by creating them on your local machine, and then providing us your public key. However, there are a few complexities with SSH keys:
- You must create the SSH key before creating the server; you cannot simply add SSH keys to existing servers.
- If enabled, you can only log in to servers via SSH using computers that have your SSH keys.
SSH keys work off a public/private key pair. You don't need to understand the technology to make it work, but Caltech has an explanation here.
Create an SSH key pair
- Launch Terminal.
- Generate an RSA key pair:
- Do not enter a value; Terminal will create the key in
Terminal displays where it will save the key pair file. It's important to take note of that to ensure you can find the file for the next step.
- (Recommended) Enter a passphrase for the key pair. You will need to enter this every time you log in to your server via SSH, which further protects your server against compromise.
Enter the passphrase again.
Locate and open your public key
- In Finder, click Go.
- Click Go to Folder.
- Enter the name of the directory where Terminal created your public key.
- Copy the entire contents of the public key file.
Add your public key to Cloud Servers
- In Cloud Servers, click SSH keys.
- Click Create key.
- Enter a Name, and then paste your public key in the Key field.
- Click OK.
- Create a server using your SSH key