> ## Documentation Index
> Fetch the complete documentation index at: https://citodocs.prostack.host/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH

> Manage SSH keys and access for your Cito sites

Individual Cito sites have their own SSH account and credentials. To SSH into an individual Cito site, you can add a public key to it.

<Tip>
  **What about SFTP?**

  SFTP uses the same port and authentication details as SSH. You can use your username, SSH key and the server's IP to log into a site using your SFTP client of choice.
</Tip>

You can assign a key to more than one site, or add a 'default' key, that is assigned to all new sites, using the steps below.

## Adding a new key

To add a new key, visit the SSH Keys link in the dashboard navigation bar. From here you can view, add and remove keys.

<Tip>
  **What key types**

  We support *rsa* and *ed25519* key types. Any other key type will be rejected.
</Tip>

Click 'Add new managed key' and a field will appear for you to paste in your **Public** key. We automatically populate the key name using the comment, but you can change this if desired.

<img src="https://mintcdn.com/prostackhosting/mdYxEEoAStQaBUbz/images/screenshots/sshkeyadd.png?fit=max&auto=format&n=mdYxEEoAStQaBUbz&q=85&s=a044d674c05d26b48c475df31e8d11ea" alt="SSH Key Add" width="2414" height="724" data-path="images/screenshots/sshkeyadd.png" />

**For security reasons we require all newly added keys to be confirmed via email.** When you add a new key we automatically email the following:

* The account owner
* Any contact added to the Prostack Portal. You can add a new contact by following [this guide](https://prostack.uk/portal/index.php?rp=/knowledgebase/102/How-do-I-add-a-new-contact-to-email-in-support-requests.html).

You will need to click the "Add Key" button to confirm.

<img src="https://mintcdn.com/prostackhosting/QIchgQwDCFFcMn6_/images/screenshots/sshmagicemail.png?fit=max&auto=format&n=QIchgQwDCFFcMn6_&q=85&s=76e1084f299f3d8f8a4ff2a95f192e14" alt="SSH Magic Email" width="1098" height="922" data-path="images/screenshots/sshmagicemail.png" />

## Assigning keys to sites

Once a managed key has been added you can assign it to individual sites for access. You can do this via the `Manage sites` option for each key, or from the Settings page for a site, by clicking 'SSH keys'.

<img src="https://mintcdn.com/prostackhosting/mdYxEEoAStQaBUbz/images/screenshots/assigntosite.png?fit=max&auto=format&n=mdYxEEoAStQaBUbz&q=85&s=33f8db465997bdda896e55a3867a55dc" alt="Assign to Site" width="1326" height="362" data-path="images/screenshots/assigntosite.png" />

This page will show you the keys assigned to a site. You can paste in a key to add it.

Once a key is added, it will appear in the list and will work for SSH access.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/prostackhosting/images/screenshots/existingkeys.png" alt="Existing Keys" />

## Default keys

Default keys are SSH keys that are **automatically assigned to newly created sites**. This is controlled by the "Assign to new sites" toggle on each key.

When a key is set as default, a notification will appear below it to indicate it will be automatically assigned to new sites.

<img src="https://mintcdn.com/prostackhosting/mdYxEEoAStQaBUbz/images/screenshots/existingkeys-assignnew.png?fit=max&auto=format&n=mdYxEEoAStQaBUbz&q=85&s=0f30a7a4500faae8a4d72e420b3f653f" alt="Existing Keys - Assign New" width="2514" height="378" data-path="images/screenshots/existingkeys-assignnew.png" />

## Deleting keys

There are two ways to delete an SSH key from a site

* You can remove individual keys from sites using the "SSH keys" section under 'Site Settings'

* You can also remove a key from the "SSH Keys" page, which deletes it from all sites at once.

## What about the `admin` user?

The `admin` user has root privileges via the `sudo` command. For this reason, we do not allow it to be managed via the dashboard.

To amend `admin` keys you can modify `authorized_keys` via SSH or alternatively contact support for assistance.
