Skip to content
RIPE NCC member · Local Internet RegistryCall us on 020 3318 3449sales@hosting-telecom.uk

How to connect to your server over SSH

Cloud servers5 min read

Logging in with a password for the first time, logging in with an ed25519 key, turning off passwords, and what to do if you lose access.

Contents

Once your server has been created, the password arrives by email and the server’s IP address is shown on the server page in your control panel. For 24 hours after the system is installed you can also see the password there, on the operating system tab. If you set your own password or chose an SSH key when you ordered, use those. To connect you need the ssh program — it is already included in Windows 10 and 11, macOS and Linux, and you can run it from an ordinary terminal or PowerShell.

Which account to log in with

Each system has its own administrator account — its name is given in the email and on the server’s page:

SystemAccount
Ubuntuubuntu
AlmaLinux 9 and 10almalinux
Debian 13debian
FreeBSD 15freebsd

Run commands that need administrator rights through sudo: sudo apt update, sudo dnf upgrade. To switch to a root shell: sudo -i.

To create accounts for other people, see Users and sudo.

Connecting for the first time

ssh ubuntu@203.0.113.10

Replace ubuntu with the account for your system, and 203.0.113.10 with your server’s IP address. The first time you connect, ssh asks whether you trust the server — type yes. Then enter the password from the email: the characters aren’t shown as you type, and that is normal.

Run long commands — system updates, file transfers — in tmux: if your connection drops, they will carry on and finish.

Logging in with a key instead of a password

A key is more secure than a password: it can’t be guessed by brute force, and you don’t have to type anything when you log in. Create the key on your own computer, not on the server:

ssh-keygen -t ed25519

Keep the suggested location for the file — just press Enter. A passphrase for the key is optional, but with one the key is useless to anyone who gets hold of your computer. Two files are created: the private key id_ed25519 — which stays only with you — and the public key id_ed25519.pub, which goes onto the server.

Copy the public key to the server. On macOS and Linux:

ssh-copy-id ubuntu@203.0.113.10

Windows has no ssh-copy-id command; in PowerShell, this line does the same thing:

type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh ubuntu@203.0.113.10 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"

Now ssh ubuntu@203.0.113.10 lets you into the server without a password.

You can also save the key in your control panel: in the SSH keys section choose “Add key” and paste the contents of the id_ed25519.pub file. A saved key can be selected when you order a server and when you reinstall the system, so the new system accepts it straight away. A key saved in the control panel isn’t added to a server that is already running — add it with the command above.

Turning off password login

Once key login works, it is best to turn off password login — guessing passwords then becomes pointless. Don’t close your current connection until you have checked that key login works in a new terminal window.

Ubuntu, Debian and AlmaLinux:

echo "PasswordAuthentication no" | sudo tee /etc/ssh/sshd_config.d/10-no-password.conf
sudo sshd -t

The number 10 in the file name makes the setting load before the others: SSH uses the first value it finds. If sshd -t prints nothing, there are no errors — restart SSH: sudo systemctl restart ssh on Ubuntu and Debian, sudo systemctl restart sshd on AlmaLinux. To check, sudo sshd -T | grep -i passwordauthentication should show passwordauthentication no.

FreeBSD: in /etc/ssh/sshd_config set PasswordAuthentication no and KbdInteractiveAuthentication no, then run sudo service sshd restart.

SSH on shared hosting

On shared hosting, we enable SSH on request — contact our support team through the contact form. Log in with your cPanel username. Add your own key in cPanel, under SSH Access → Manage SSH Keys: Import Key, then Authorize.

SSH tunnel

A tunnel lets you reach a service on the server that is closed to the outside world, through an SSH connection that is already open. For example, to connect to MySQL on your server from a program on your computer:

ssh -L 3306:127.0.0.1:3306 ubuntu@203.0.113.10

While this window is open, your database program connects to address 127.0.0.1, port 3306 — and ends up on the server. If your computer already has its own MySQL on that port, use another one: -L 13306:127.0.0.1:3306. In PuTTY, the same thing is set up under Connection → SSH → Tunnels.

If you have lost access

  • The console in your control panel. Open your server in the control panel and use the Console button, or the screenshot on the overview tab. You need a password to log in through the console — keys aren’t used there. The console is the server’s screen and keyboard: you can log in through it even if SSH or the server’s network isn’t working.
  • A new password. On the operating system tab, use “Reset password”: we set a new password for the account, show it to you and email it. The password remains visible on that tab for 24 hours.
  • The warning REMOTE HOST IDENTIFICATION HAS CHANGED after reinstalling the system is normal: the new system has a new server key. Remove the old entry on your computer: ssh-keygen -R 203.0.113.10.

For what else you can do with your server from the control panel, see Rebooting, reinstalling and snapshotting your server.

Didn’t find the answer? Ask our support team — we’ll help.

Choose which cookies we may use. You can change your mind at any time with the “Cookie settings” link at the bottom of every page.

Necessary

Always active

They keep the site secure and remember your cookie choice. They don’t identify you.

Google Analytics counts visits and shows which pages people find useful, so we can improve the site. Which cookies