How to Connect to Your Linux VPS with SSH on Port 22

AVASERVER Published

How to Connect to Your Linux VPS with SSH on Port 22

To connect to a Linux VPS with SSH, open a terminal and run ssh root@YOUR_SERVER_IP -p 22. Type yes once to accept the server’s host key, then enter the root password from your server details. Port 22 is the standard SSH port, and every AVASERVER Linux VPS is delivered with SSH listening on it.

This guide covers Windows 10/11, macOS and Linux desktops. It also covers the SSH errors that most often stop people from logging in.

What you need before you connect

You need three things. All of them are in the activation email we send when the server is ready, and in the Client Area under Services once you open the server.

ItemExampleWhere to find it
Server IP address203.0.113.10Activation email, or the service page in the Client Area
UsernamerootActivation email (Linux servers use root by default)
Passworda random 16+ character stringActivation email

The examples use 203.0.113.10, an address reserved for documentation. Replace it with your own server’s IP.

How do I connect with SSH from Windows 10 or 11?

Windows 10 (version 1809 and later) and Windows 11 already include an SSH client, so you don’t need to install anything.

  1. Press Win + X and open Terminal or Windows PowerShell.
  2. Type ssh root@203.0.113.10 -p 22 and press Enter.
  3. On the first connection, type yes when you are asked about the host key.
  4. Paste or type the password and press Enter. The cursor does not move while you type; that is normal.
  5. You are in when the prompt changes to something like root@server:~#.
ssh root@203.0.113.10 -p 22

To paste a password into the Windows terminal, right-click inside the window. Ctrl+V also works in Windows Terminal.

How do I connect with SSH from macOS or Linux?

On macOS, open Terminal from Applications › Utilities. On a Linux desktop, open your terminal app. Then run the same command:

ssh root@203.0.113.10 -p 22

The -p 22 part is optional, because 22 is the default. We keep it in the examples so you know where to change it if you later move SSH to another port.

What does the host key question mean?

On the first connection you will see a message like this:

The authenticity of host '203.0.113.10 (203.0.113.10)' can't be established.
ED25519 key fingerprint is SHA256:Xk3...
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Your computer has never seen this server before, so it asks you to trust its identity. Type yes. The key is then saved in a known_hosts file, and you are not asked again unless the key changes.

Fix the most common SSH errors

Connection timed out. Your computer can’t reach port 22 on that IP. Check the IP for typos and make sure the server is running in the Client Area. If you just rebooted or reinstalled, wait two minutes and try again. You can test the port from Windows PowerShell:

Test-NetConnection 203.0.113.10 -Port 22

TcpTestSucceeded : True means the port is open. From macOS or Linux, use nc -vz 203.0.113.10 22 instead.

Connection refused. The server answered, but nothing is listening on port 22. This happens when the SSH service is stopped, or when someone moved SSH to another port in /etc/ssh/sshd_config. Use the new port with -p, or open a ticket and we will check the service.

Permission denied (publickey,password). The username or password is wrong, or password login is turned off. Copy the password again without the trailing space that email clients sometimes add. Remember that passwords are case-sensitive.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED. You will usually see this after reinstalling the operating system, because a fresh install creates new host keys. If you reinstalled the server yourself, remove the old key and connect again:

ssh-keygen -R 203.0.113.10

If you did not reinstall anything, stop and contact us before connecting.

Too many authentication failures. Your SSH agent offered too many keys before the password prompt. Force password login for this connection:

ssh -o PubkeyAuthentication=no root@203.0.113.10 -p 22

Use an SSH key instead of a password

Key login is faster and much harder to brute-force than a password. Create a key once on your computer:

ssh-keygen -t ed25519

On macOS or Linux, copy it to the server with one command:

ssh-copy-id -p 22 root@203.0.113.10

Windows does not include ssh-copy-id. Run this in PowerShell instead:

type $env:USERPROFILE.sshid_ed25519.pub | ssh root@203.0.113.10 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

Log out with exit, then connect again. If you are not asked for a password, key login works.

Keep long tasks running after you disconnect

If your connection drops during an update or a control panel install, the running command can stop with it. Start long jobs inside a terminal multiplexer such as tmux:

dnf install -y tmux      # AlmaLinux / Rocky
apt install -y tmux      # Ubuntu / Debian
tmux new -s work

If you get disconnected, log in again and run tmux attach -t work to pick up where you left off.

When to open a ticket

Open a ticket from the Client Area if the port test fails while the server shows as running, or if you no longer have the root password. Include the server IP, the exact error text and the time you tried, so we can match it with the server logs. You can find all contact options on our contact page.

Next steps: change the root password to one only you know, or install cPanel on AlmaLinux.

Frequently asked questions

Do I have to type -p 22 every time?

No. Port 22 is the SSH default, so ssh root@203.0.113.10 connects to the same place. You only need -p when SSH runs on a different port.

Why does nothing appear when I type my password?

SSH hides password input completely, without dots or stars, so nobody can see its length. Type or paste it and press Enter.

Can I use SSH from a phone?

Yes. Any SSH client app for Android or iOS works with the same IP, port 22, username and password.

Is it safe to log in as root?

It works, but a long password or an SSH key is essential. Many admins create a normal user with sudo rights for daily work and keep root for maintenance.

Related articles