# Get a cloud server

> Make an SSH key, order a Cloud Compute instance, sign in to it over SSH and take its first snapshot, from start to finish.

Source: https://www.coritan.com/docs/get-started/get-a-cloud-server/

In the dashboard:

- /dashboard/order/cloud-compute: https://www.coritan.com/dashboard/order/cloud-compute
- /dashboard/compute: https://www.coritan.com/dashboard/compute
- /dashboard/compute/…/access: https://www.coritan.com/dashboard/compute
- /dashboard/compute/…/snapshots: https://www.coritan.com/dashboard/compute

This tutorial gives you a Linux virtual machine of your own, a Cloud Compute *instance*, and signs you in to it over SSH. You make an SSH key, order the instance with the key on it, connect from your computer, and take a snapshot to return to if a change goes wrong. Each section ends with something you can check before you go on.

It costs the plan you choose, by the month or by the hour, and the order page shows each price. One public IPv4 address comes with the instance at no charge while it stays attached as its primary address ([How instances are billed](/docs/cloud-compute/#how-instances-are-billed)). If virtual machines are new to you, read [Cloud servers](/docs/learn/cloud-servers/) first.

## Before you begin

- A Coritan account. [Create an account](/docs/get-started/create-an-account/) if you have none, then sign in.
- Credit for the first invoice, or a card or PayPal to pay it when you order ([Add credit to your balance](/docs/billing/add-credit/)). Hourly billing also needs a minimum total of deposits on your account ([How hourly billing works](/docs/billing/hourly-billing/)).
- A terminal: on Linux or macOS, or PowerShell on Windows 10 and later.

## 1. Make an SSH key

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

1. In your terminal, create a key pair:

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

   Press <kbd>Enter</kbd> to keep the default file, and choose a passphrase when it asks.
2. Print the public key:

   ```bash
   cat ~/.ssh/id_ed25519.pub
   ```

The terminal prints one line that starts with `ssh-ed25519`. Copy the whole line ([Make an SSH key](/docs/cloud-compute/connect-to-an-instance/#make-an-ssh-key)).

## 2. Order the instance

1. In the dashboard, go to [Cloud Compute](https://www.coritan.com/dashboard/compute) and select **Order instance**.
2. Under **Plan**, choose how often to pay, then a plan under **Size**. Each row shows its vCPUs, memory, disk and monthly traffic.
3. Under **Operating system**, choose a card under **Distribution**, such as Ubuntu. The line under the releases names the user you sign in as.
4. Under **Location**, choose the data centre closest to the people who will use the instance.
5. Under **Settings**, keep the suggested **Hostname** or type your own, such as `web-1`. Paste your public key under **SSH keys**, and leave the switch on the **Public IPv4 address** card on.
6. Check the summary under **Your order**, then select the button under it. It reads **Deploy instance** when your credit pays the first invoice, and **Place order and pay** when you pay on the next page.
7. If the order's page reads **Order placed, payment due**, pay under **Pay invoice**.

The order's page shows **Setting up** while Coritan builds the instance, and its title becomes **Your order is ready**. The instance appears on the [Cloud Compute](https://www.coritan.com/dashboard/compute) page with its address ([Create an instance](/docs/cloud-compute/create-an-instance/)).

## 3. Sign in over SSH

1. On the **Cloud Compute** page, select the instance's hostname to open it, then select **Copy address** in the header.
2. Select the **Access** tab. The **User account** card shows the user to sign in as under **Username**, such as `ubuntu`.
3. In your terminal, connect as that user, with the address you copied:

   ```bash
   ssh ubuntu@203.0.113.10
   ```

4. The first time, SSH asks you to confirm the host's fingerprint. Type `yes`.

Your terminal shows the instance's shell prompt, and `hostname` prints the hostname you chose. Coritan also sets a password for the user, but no page shows it. To sign in with a password instead of your key, reset it on the **Access** tab first ([Connect to an instance over SSH](/docs/cloud-compute/connect-to-an-instance/)).

## 4. Take a first snapshot

A snapshot saves the instance's disk as it is now, so you can return to this clean state after a change that goes wrong.

1. Open the instance's **Snapshots** tab and select **Take snapshot…**.
2. Under **Name**, type a name such as `clean-install`. Start with a letter, use letters, digits, hyphens and underscores, and keep it to 37 characters.
3. Select **Take snapshot**.

The snapshot appears in the table with `Disk` under **Contents**. **Roll back…** in the menu at the end of its row returns the disk to it, and loses everything written since ([Take and roll back instance snapshots](/docs/cloud-compute/snapshots/)).

## Troubleshooting

`Permission denied (publickey)`
: The instance does not hold the key you used, or you signed in as the wrong user. Check **Username** on the **Access** tab ([Connect to an instance over SSH](/docs/cloud-compute/connect-to-an-instance/#troubleshooting)).

`Connection timed out`
: The instance is stopped or has no public address. Start it with the power buttons in its header ([Start, stop and restart an instance](/docs/cloud-compute/power/)).

`Each line must be one OpenSSH public key, e.g. "ssh-ed25519 AAAA… you@laptop".`
: A line under **SSH keys** is not a public key. Paste the contents of the `.pub` file, one key per line.

## Next steps

- [Put a website online](/docs/get-started/put-a-website-online/) with the instance as the site's origin
- [Back up and restore an instance](/docs/cloud-compute/backups/), for a copy that survives a rebuild
- [Manage an instance's addresses and names](/docs/cloud-compute/networking/), such as its reverse DNS name
