THOSTHelp guides

VPS servers

Add an SSH key to your VPS and turn off password sign-in

Create an SSH key on Windows, macOS or Linux, copy it to your THOST VPS with ssh-copy-id, and optionally turn off password sign-in.

Checked against the live THOST dashboard on

An SSH key is safer than a password and saves typing it. A reinstall always starts with password sign-in, so add your key after each reinstall.

Steps

  1. Create a key on your computer (skip if you already have one in ~/.ssh/id_ed25519.pub): Press Enter to accept the file name, and choose a passphrase.
    ssh-keygen -t ed25519
  2. Copy it to the VPS. Use the command from the Rebuild tab's SSH keys card, which has your port filled in, for example: Enter the VPS admin password once.
    ssh-copy-id -p 20000 admin@vps.t-host.co.uk
  3. Test it. Run your normal SSH command. It should sign in without asking for the password (only your key's passphrase, if you set one).
  4. Turn off password sign-in (optional). Once key sign-in works, edit /etc/ssh/sshd_config with sudo nano /etc/ssh/sshd_config, set PasswordAuthentication no, save, and run sudo systemctl restart ssh. Keep your current session open and test a new one before you close it.

Windows without ssh-copy-id

  1. Show your public key in PowerShell: type $env:USERPROFILE\.ssh\id_ed25519.pub and copy the line.
  2. Sign in to the VPS with the password and run:
    mkdir -p ~/.ssh && chmod 700 ~/.ssh && nano ~/.ssh/authorized_keys
  3. Paste the line, save, then run chmod 600 ~/.ssh/authorized_keys.

Questions

Can I add keys from the dashboard?

Not yet for VPS (it is on the way). Storage Boxes already have an SSH keys tab.

I turned off passwords and lost my key.

Reinstall from the Rebuild tab (it wipes the disk and starts again with password sign-in), or open a ticket.

Did this not solve it? Open a support ticket and tell us which guide you followed. We answer every ticket ourselves.