Add an SSH key
Open Compute → SSH Keys in the console. You can import a key you already have, or create a new one.- Import your existing key (recommended)
- Create a key in the console
If you already have a key on your computer, show its public half:No key yet? Create one first:Then in Compute → SSH Keys, choose Import, give the key a name, paste the contents of the
.pub file, and save.Connect to your server
You turn on SSH for each server you want to reach, and the console gives you the exact command for it.1
Turn on SSH for the server
Open Compute → Servers, open your server, and choose Actions → Enable SSH. You can also use the SSH switch on the server’s row in the list. Confirm.
2
Copy the command
After a short wait, the server’s Details tab shows a Connect box with the
ssh command for this server. Click Refresh if it isn’t there yet. Copy the command and run it on your computer.The command expects your private key at ~/.ssh/<key-name>.pem, named after the SSH key in the console. If you saved it somewhere else, change the path after -i to match.The ready-made images use the user ubuntu, and only the private key that matches the SSH key you chose when you created the server can log in. The first time you connect, SSH asks you to confirm the server’s fingerprint. Type yes.3
Check the GPU
Save the connection once
The Connect box also has a section called Skip the port every time. It holds a ready-made entry for your SSH config file. Add it to~/.ssh/config on your computer, and from then on you only need the server’s name:
scp, rsync and VS Code Remote-SSH use the same entry. If your private key isn’t at the path in the entry’s IdentityFile line, change it to match. The Connect box’s Copy files section has ready-made scp and sftp commands too.
Turn SSH off
Choose Actions → Disable SSH on the server’s page, or use the SSH switch in the list. Open sessions end shortly afterwards. The server keeps its SSH command while SSH is off, so the same command works when you turn SSH on again. Deleting a server removes its SSH access automatically.Without SSH: the browser console
If SSH doesn’t answer, you can still reach a running server from your browser. Open the server’s page, click Console, then Open console. The server’s screen opens in a new tab, with keyboard and mouse, as if a monitor were plugged in. To see what the server printed while starting up, use its Boot log tab instead.To sign in through the browser console, the
ubuntu user needs a password, but the ready-made images only accept SSH keys. If you want the browser console as a backup, set a password first while connected over SSH: sudo passwd ubuntu.Troubleshooting
Related
Launch a GPU server
Pick a server type, an image and a network.
Jupyter on your GPU
Run notebooks through a secure SSH tunnel.
SSH keys
The keys that let you log in.
Where your data lives
What is kept, what is lost, and how to save results.