Skip to content
Coritan Docs

Connect to an instance over SSH

Find an instance's address and user name, and sign in over SSH with your key or a password.

View as Markdown

Sign in to an instance over SSH to run commands on it. You connect as the image's default user, with the SSH key you added when you ordered or with a password you reset. The commands below work in a terminal on Linux and macOS, and in PowerShell on Windows 10 and later.

  • The instance is running and has a public address. The header shows it, and Copy address copies it. An instance that shows No address needs a floating IP first.
  • You know the user to sign in as. Open the instance's Access tab: the User account card shows it as Username.
  • You have an SSH key pair whose public key is on the instance, or a password for the user.

Skip this if you already have a key in ~/.ssh.

  1. Create a key pair:

    Shell
    ssh-keygen -t ed25519 -C "alex@example.com"
    

    Press Enter to keep the default file, and choose a passphrase when asked.

  2. Print the public key and copy the whole line:

    Shell
    cat ~/.ssh/id_ed25519.pub
    
  3. Paste it under SSH keys when you order an instance. For an instance you already have, paste it on the Access tab and restart the instance, as Manage SSH keys describes.

  1. In the dashboard, go to Cloud Compute and open the instance. Select Copy address in the header.

  2. Connect as the user the Access tab names, with the address you copied:

    Shell
    ssh ubuntu@203.0.113.10
    
  3. The first time, SSH asks you to confirm the host's fingerprint. Type yes.

  1. Open the instance's Access tab and reset the password. The instance must be running. Copy the new password; we show it once.
  2. Connect with ssh as above and type the password when asked.

Many cloud images refuse password sign-in over SSH. If yours does, sign in on the display console with the password instead, and add your key to ~/.ssh/authorized_keys from there.

Your terminal shows the instance's shell prompt. Run hostname to check that you are on the right instance.

Permission denied (publickey)
The instance does not hold the key you used, or you signed in as the wrong user. Check the user on the Access tab. Keys saved on the Access tab apply only after the instance boots again. A rebuild does not put your keys back, so save them again and restart.
Connection timed out or No route to host
The instance is stopped, has no public address, or has not picked up an address you attached. Start or restart it from the dashboard header, which boots it with its current network settings. If the address is a floating IP, check the rules on its Shield tab.
Connection refused
The address answers, but no SSH server listens on port 22. Sign in on the display console and start the SSH service, or check which port it uses.
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

The instance has new SSH host keys. A rebuild creates new ones, and cloud-init usually does too on the first boot after you change the instance's keys, password, hostname or network settings. If you made one of those changes, remove the old entry and connect again:

Shell
ssh-keygen -R 203.0.113.10