Lesson 4 of 47 min readBeginner

How to connect to an Ubuntu VPS with SSH

Connect to your Ubuntu VPS over SSH from Windows, macOS or Linux, sign in with a password or an SSH key, and fix the common connection errors.

Updated · QuantVPS Support

Terminal · your computer
$ ssh root@203.0.113.10The authenticity of host '203.0.113.10 (203.0.113.10)' can't be established.ED25519 key fingerprint is SHA256:Xr4…example.Are you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added '203.0.113.10' (ED25519) to the list of known hosts.root@203.0.113.10's password:Welcome to Ubuntu 24.04 LTS (GNU/Linux x86_64)root@your-vps:~#

Example session. 203.0.113.10 is a documentation address; use the IP in your Control Panel.

On this page
  1. What you need
  2. Sign in with your password
  3. Switch to an SSH key
  4. Save a shortcut
  5. Lock it down (optional)
  6. Copy files, keep jobs running
  7. Fix common errors

What you need

  1. Step 1: Find your login details

    Open the Control Panel in your QuantVPS dashboard and copy the server's IP address, username and password. On Ubuntu the username is root unless the Control Panel shows another.

  2. Step 2: Open a terminal

    • Windows 10 or 11: PowerShell or Windows Terminal (the OpenSSH client is built in).
    • macOS: Terminal, in Applications › Utilities.
    • Linux: any terminal.

Sign in with your password

  1. Step 3: Run ssh

    Your computer
    ssh root@203.0.113.10
  2. Step 4: Confirm the host key

    The first time, SSH shows the server's key fingerprint and asks Are you sure you want to continue connecting? Type yes and press Enter. Your computer remembers the server from now on.

  3. Step 5: Enter your password

    Paste or type the password and press Enter. Nothing appears while you type; that is normal. When you see the Ubuntu welcome and a prompt ending in #, you are signed in.

Type exit to leave. Programs you start in that session stop when it closes, unless you run them as described in keep jobs running.

Switch to an SSH key

An SSH key is a pair of files: a private key that stays on your computer and a public key you put on the server. It is much harder to guess than a password, and you never type it.

  1. Step 6: Create an SSH key

    Your computer
    ssh-keygen -t ed25519 -C "my-laptop"

    Press Enter to keep the default file (~/.ssh/id_ed25519). A passphrase is optional and protects the key if your computer is lost.

  2. Step 7: Copy the key to the server

    On macOS or Linux:

    Your computer
    ssh-copy-id root@203.0.113.10

    On Windows, in PowerShell:

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

    Both ask for the server password one last time.

  3. Step 8: Test the key

    Your computer
    ssh root@203.0.113.10

    You sign in without the server password (you are asked for the key's passphrase if you set one).

Save a shortcut

Add the server to ~/.ssh/config on your computer (on Windows, C:\Users\you\.ssh\config), creating the file if it does not exist:

~/.ssh/config
Host quantvps    HostName 203.0.113.10    User root    IdentityFile ~/.ssh/id_ed25519

Now ssh quantvps is enough.

Lock it down (optional)

Once your key works, you can turn off password sign-in so only keys get in. Keep your current session open while you do this, and test from a second terminal before you close it.

On the server (as root)
grep -rn PasswordAuthentication /etc/ssh/sshd_config /etc/ssh/sshd_config.d/

Set PasswordAuthentication no in /etc/ssh/sshd_config and in any file the search found in /etc/ssh/sshd_config.d/ (a file there can override the main one), for example with nano. Then check the configuration and restart SSH:

On the server (as root)
sshd -tsystemctl restart ssh

To add a firewall, allow SSH first, then turn it on:

On the server (as root)
ufw allow OpenSSHufw enable

Copy files, keep jobs running

Copy a file from your computer to the server's home folder with scp (add -r for a folder):

Your computer
scp ./bot.py root@203.0.113.10:~/

To keep a script running after you disconnect, start it inside tmux, then detach with Ctrl+BD and reattach later. Install it with apt install tmux if it is missing. Start a session named bot:

On the server (as root)
tmux new -s bot

After you sign in again, reattach to it:

On the server (as root)
tmux attach -t bot

For a bot that must survive reboots, run it as a systemd service. Our Linux trading VPS page covers what else the server is built for.

Fix common errors

Connection timed out
Check the IP address, and that the server shows as online in the Control Panel (a reinstall takes a few minutes). A firewall rule that blocks port 22 has the same effect.
Connection refused
The server answered but SSH is not listening on that port: SSH was stopped, or its port changed. Connect with ssh -p and the right port, or contact support.
Permission denied (publickey,password)
The username or password is wrong, or passwords are off and your key is not installed. Copy the details from the Control Panel instead of typing them.
REMOTE HOST IDENTIFICATION HAS CHANGED
Expected after a reinstall: the server has a new key. Remove the old one with ssh-keygen -R 203.0.113.10 (your IP), then connect and type yes again.
'ssh' is not recognized (Windows)
Turn on the OpenSSH Client in Windows Settings under Optional features, then open a new PowerShell window.

Still stuck? Open a ticket from the Support tab in your dashboard or contact us; our team is available 24/7. More lessons are in QuantVPS Learn.

Put the lesson to work. Your VPS is live in under 60 seconds.

Pick a plan, connect from any device, and our support team helps with the setup, 24/7.

Questions about this lesson.

root, unless your Control Panel shows a different username for the server. The Control Panel also shows the IP address and the password.

SSH hides the password as you type, with no dots or stars. Type or paste it and press Enter.

Yes. Enter the IP address, port 22 and connection type SSH, then sign in as root. PuTTY uses its own key format (.ppk); PuTTYgen converts an OpenSSH key.

Port 22 by default. To change it, allow the new port in your firewall first, then set Port in /etc/ssh/sshd_config. Ubuntu 24.04 starts SSH through systemd socket activation, so apply the change with systemctl daemon-reload and then systemctl restart ssh.socket. Connect with ssh -p and the new port, and keep your current session open until that works.

Ubuntu servers are managed over SSH. For a Remote Desktop workspace with charting platforms, choose Windows Server when you order.