Get started

Getting started

How to connect to a Linux server with SSH

Log in to a new VPS or dedicated server from Windows, macOS or Linux, then switch from passwords to SSH keys.

By LowCostServ · Updated November 12, 2026 · 3 min read

Val sits with a laptop; a line of light runs from it to a server rack on the horizon.

SSH is how you talk to a Linux server: an encrypted terminal session between your computer and the machine. This guide takes you from the access details in your client area to a passwordless, key-based login. The examples use 203.0.113.10 as the server address; replace it with yours.

What you need

  • The IP address of your server, from the Services page of your client area.
  • The username, normally root on a new server.
  • The password shown on the same page. You will replace it in a few minutes.

Connect for the first time

macOS, Linux and Windows 10 or 11 all ship with an SSH client. Open Terminal (or PowerShell on Windows) and run:

ssh root@203.0.113.10

The first time, SSH shows the server’s fingerprint and asks whether to continue. Type yes. From then on your computer remembers the server and warns you if its identity ever changes. Enter the password when asked; nothing appears on screen as you type, which is normal.

On an older Windows? Install PuTTY, enter the IP address in “Host Name”, keep port 22 and click Open.

Switch to SSH keys

A password can be guessed; a key cannot, in any practical sense. A key pair has two halves: a private key that stays on your computer, and a public key that you place on the server.

1. Create a key on your computer

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

Press Enter to accept the default location. A passphrase is optional but recommended: it protects the key if your computer is stolen.

2. Copy the public key to the server

On macOS and Linux:

ssh-copy-id root@203.0.113.10

On Windows PowerShell, which has no ssh-copy-id:

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

3. Test it

ssh root@203.0.113.10

You should get a shell without being asked for the server password.

Turn password logins off

Once the key works, close the door that bots are knocking on. On the server:

echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/10-keys-only.conf
sshd -t && systemctl restart ssh

On AlmaLinux and Rocky Linux the service is called sshd instead of ssh.

Keep your current session open and test the login from a second terminal before you close it. If something is wrong you can still fix it.

A shortcut for next time

Add an entry to ~/.ssh/config on your computer:

Host myserver
    HostName 203.0.113.10
    User root
    IdentityFile ~/.ssh/id_ed25519

From now on, ssh myserver is enough. The same name works with scp, rsync and most editors.

When it does not work

MessageUsual causeFix
Connection timed outWrong IP address, or a firewall in betweenCheck the address; try from another network
Connection refusedThe server is still starting, or SSH is not runningWait a minute and retry
Permission denied (publickey)The server does not have your public keyRepeat step 2, or log in from the computer that has the key
REMOTE HOST IDENTIFICATION HAS CHANGEDYou reinstalled the server, so its fingerprint is newssh-keygen -R 203.0.113.10, then connect again

Next step

You are logged in as root with a key. Before installing anything, spend fifteen minutes on the basics: updates, a normal user and a firewall. That is the subject of Secure a new Linux server in 15 minutes.

Sources and further reading

Your own server, in a few minutes.

Cloud VPS from $3.99 a month: no email, no ID, crypto payment, root access in minutes.

  • No KYCNo email, no ID
  • No DMCANotices not acted on
  • Crypto friendlyBTC, ETH, XMR, USDT, SOL
  • UnmeteredOn every plan

Client area

One key for your servers, your payments and your balance.

  • Nothing about you. No email, no name, no phone number, no ID.
  • Pay in crypto. BTC, ETH, XMR, USDT and SOL.
  • Up to +30% on top-ups. The bonus starts at $100.
  • Yours alone. We keep a fingerprint of your key, never the key itself.
How the access key works

Your account

No email, no password, no name. One access key.

New here? Create your access key