Key pairs
Create or import SSH keys, add them to a machine, and sign in without a password.
A key pair lets you sign in to a machine over SSH with a key file instead of a password. The public key is installed on the machine; you keep the private key on your computer. You manage key pairs in KeysKey Pairs and add them to machines from each machine's details.
Generate a new key pair
Use this if you don't have a key yet.
- Open KeysKey Pairs.
- Click Generate.
- Enter a Name, for example
laptop-alex. - Optionally enter a Passphrase. If you do, you'll type it each time you use the key.
- Click Submit.
The key pair is created and your browser downloads it straight away. The key pair also appears in the list.
Anyone with private.pem can sign in to the machines it is attached to. Don't email it or put it in shared folders. If you open Generate again later, the form may still show the previous name and passphrase: change them before submitting.
Import a key you already have
- Open KeysKey Pairs and click Add.
- Enter a Name.
- Paste your public key into Public Key. It is one line that starts with
ssh-rsa,ssh-ed25519or similar, usually from a file such as~/.ssh/id_ed25519.pub. - Leave Private Key (Optional) and Passphrase empty unless you want to store the private key here too.
- Click Submit.
The key pair appears in the list. If you open Add again later, the Public Key and Private Key (Optional) boxes may still hold what you pasted last time: clear them before you paste a new key. The console doesn't check the key's format: if it is rejected, you'll see an error message. Check you pasted the public key, in one piece.
Download a key pair
- Open the key pair's Action menu and click Download.
- Click Download in the dialog that says Click to download key pairs.
The downloaded file
Both Generate and Download save a ZIP file named keys-<Super Id>. It contains:
private.pem: the private key. Empty if you imported only a public key.public.pub: the public key.
The file may be saved without the .zip extension. If your computer doesn't open it, rename it to keys-<Super Id>.zip and open it again.
Add a key pair to a machine
- Open Super MachinesMachines, select the prefix and open the machine (click its card or Super Id).
- Go to the Security/Access tab.
- Under Key Pairs, click Attach.
- Check the Username. It is the user on the machine that the key is installed for, and is
superunless you change it. - Pick the key in Key Pairs. Each one shows its name and Super Id.
- Click Attach.
The key appears under Key Pairs in the Security/Access tab as Username: super | Super Id: …. Note the username: you need it to sign in.
Connect with SSH
- The machine is Running.
- A traffic profile attached to the machine allows TCP port 22 from your address.
- You have the machine's public IP. It is in the General tab, under Public Ip.
- Unzip the downloaded file and move
private.pemsomewhere private, for example your.sshfolder. - On macOS or Linux, make the key readable only by you:
chmod 600 private.pem. SSH refuses keys that other users can read. - Connect, using the username you attached the key with (
superby default):
ssh -i private.pem super@<public-ip>
If you set a passphrase, SSH asks for it. The first time you connect, SSH asks whether to trust the machine: type yes.
On Windows 10 and 11, run the same ssh command in PowerShell or Terminal.
If SSH doesn't connect
- "Permission denied (publickey)" Check the username matches the one shown under Key Pairs in the Security/Access tab, and that you are using the right
private.pem. - "UNPROTECTED PRIVATE KEY FILE" Run
chmod 600 private.pemand try again. - The connection times out. Port 22 isn't open to you. Check the machine's traffic profiles, and that your public IP hasn't changed. You can still sign in with a password through the console.
private.pemis empty. You imported only a public key. Use the private key you already had on your computer.
Remove a key pair from a machine
- In the machine's Security/Access tab, click × next to the key under Key Pairs.
- Check the Super Id and Username: Are you sure you want to detach the key pair?
- Click Detach.
As the dialog says, detaching will not remove this key pair from the machine. The key can still sign in. To block it, sign in to the machine and delete its line from ~/.ssh/authorized_keys for that user.
Delete a key pair
You can't download it again afterwards. The console doesn't warn you if the key is still attached to machines, and deleting it here doesn't remove it from them.
- In KeysKey Pairs, open the key pair's Action menu and click Remove.
- Confirm the Warning! dialog: Are sure you want to delete key pairs?
- Click Remove.