Connect to your Linux VPS with SSH

Log in to your Linux VPS with SSH from Windows, macOS or Linux, without extra software, and fix the most common error messages.

EliteStarHosting Team2 November 20263 min read

With SSH you control your Linux VPS (Debian or Ubuntu) from the command line, over an encrypted connection. Windows 10 and 11, macOS and Linux have a built-in SSH client, so you don't need to install anything.

What you need

With your order you get three details: the IP address of your VPS, the username (usually root) and the password. This guide uses 203.0.113.10 as an example. Always fill in the IP address of your own VPS.

Connect from Windows

  1. Open Terminal or PowerShell from the Start menu.
  2. Type the command below and press Enter.
ssh [email protected]

Does Windows say that ssh is not recognized? Then the OpenSSH client is missing. Open PowerShell as an administrator and install it with:

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Connect from macOS and Linux

Open Terminal. On a Mac you find it with Spotlight (Cmd+Space, type terminal), on Linux in your applications menu. Then type the same command as above.

The first time: type yes

On your first connection, your computer doesn't know the server yet. You see the message The authenticity of host ... can't be established, a fingerprint of the server and the question Are you sure you want to continue connecting. Type yes and press Enter.

Your computer now stores the server in the known_hosts file and checks on every next connection that it is still the same server.

Type your password

Next, the VPS asks for the password: [email protected]'s password:. While you type, you see nothing, no asterisks and no dots. That's normal. Type the password and press Enter.

Pasting works too: on Windows with a right-click, on a Mac with Cmd+V and on Linux usually with Ctrl+Shift+V.

When you see a line like root@your-vps:~#, you're in. With exit you close the connection again.

Common errors

  • Connection timed out: your computer gets no answer. Check the IP address. If you just ordered the VPS, wait a few minutes. Still not working? Try another network, such as your phone's hotspot: some school and work networks block SSH. A firewall on your VPS that doesn't allow SSH also gives this error.
  • Connection refused: the VPS can be reached, but nothing is listening on port 22. If you moved SSH to another port, give it with -p, for example ssh -p 2222 [email protected].
  • Permission denied, please try again: the username or password is wrong. Watch out for capital letters and don't copy a space along. After three attempts ssh stops with Permission denied (publickey,password).
  • Permission denied (publickey): logging in with a password is turned off on the server. Log in with your SSH key.
  • REMOTE HOST IDENTIFICATION HAS CHANGED: the server has a different fingerprint than your computer knows. That happens after you reinstall your VPS. Then remove the old fingerprint with ssh-keygen -R 203.0.113.10 and connect again. If you didn't reinstall anything, don't continue and contact support.

Next steps

You transfer files with the same details over SFTP, for example with FileZilla or WinSCP (protocol SFTP, port 22). After that, secure your VPS with Secure your new Linux VPS. There is more about the built-in SSH client of Windows in the Microsoft documentation.