What Is SSH? How to Connect to a Server
What is SSH? How to connect to a server over SSH from Windows, macOS and Linux, create SSH keys, turn off password login and fix common errors.

Contents
SSH (Secure Shell) is the protocol that lets you connect securely to a server over the internet and run commands on it. When you rent a VPS or a dedicated server, you never sit in front of it; you manage it over SSH from a terminal window on your own computer. So what is SSH, in one line? It is the standard, encrypted way to reach the command line of a remote Linux server.
This guide explains how SSH works, how to connect from Windows, macOS and Linux, how to create SSH keys and what to do to keep your server secure.
What is SSH?
Before SSH, people connected to servers with protocols like Telnet. With Telnet, the user name, the password and every command travelled across the network as plain text, and anyone on the same network could read them. SSH was created in 1995 to fix that, and it encrypts the whole connection.
Today, SSH almost always means OpenSSH. Almost every Linux distribution ships with the OpenSSH server, and macOS, Linux and Windows 10/11 all include the OpenSSH client.
With SSH you can:
- Run commands, install packages and manage services on the server
- Transfer files with SFTP or
scp - Reach a remote database through a secure tunnel (port forwarding)
- Access Git repositories with a key
How does SSH work?
SSH follows a client-server model. On the server, an SSH server (sshd) listens on TCP port 22 by default. You connect to that port with the SSH client on your computer.
When the connection opens, both sides first agree on encryption keys, and from then on all traffic is encrypted. Then the server checks who you are. There are two ways:
- Password login: you enter a user name and password. Simple, but exposed to password-guessing attacks.
- Key login: you create a key pair on your computer. You put the public key on the server and keep the private key to yourself. The server verifies that you hold the private key without the key ever being sent. This is far more secure.
The host fingerprint
The first time you connect to a server, you see this message:
The authenticity of host '203.0.113.10' can't be established.
ED25519 key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)?
It means you are recording the server's identity for the first time. When you type yes, the fingerprint is saved in the known_hosts file on your computer. If the fingerprint changes on a later connection, SSH warns you; that can mean the server was reinstalled, or that someone is in the middle.
How to connect to a server with SSH
You need three things: the server's IP address, the user name (usually root on a new server) and a password or key. At Nodesty, these details appear in the customer panel and are sent by email once your server is set up.
From Windows
Windows 10 and 11 need no extra software. Open PowerShell or Command Prompt and type:
ssh root@203.0.113.10
When asked for the password, nothing appears on screen as you type; that is normal. Type it and press Enter. If you prefer a graphical tool, PuTTY or Windows Terminal work too.
From macOS and Linux
Open the Terminal app and run the same command:
ssh root@203.0.113.10
If SSH runs on a port other than 22, add -p:
ssh -p 2222 root@203.0.113.10
Type exit to close the connection.
How to create an SSH key
Key login is both more secure and more convenient, because you no longer type a password every time. Create a modern, compact ed25519 key on your computer:
ssh-keygen -t ed25519 -C "my-laptop"
The command asks where to save the key and whether you want a passphrase. We recommend one: even if your laptop is stolen, the private key is useless on its own. When it finishes, you have two files:
~/.ssh/id_ed25519: the private key. Never share it.~/.ssh/id_ed25519.pub: the public key. This is what you add to servers.
Adding the public key to the server
On macOS and Linux, one command does it:
ssh-copy-id root@203.0.113.10
Windows has no ssh-copy-id, so use this in PowerShell instead:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@203.0.113.10 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
From now on, ssh root@203.0.113.10 logs you in without a password.
SSH security: first steps
Every server that is reachable from the internet faces automated password-guessing attacks within minutes of going online. Hundreds of failed attempts in /var/log/auth.log are perfectly normal. These steps make those attacks useless:
- Create a regular user. Instead of working as
rootall the time, create a user withsudorights and add your public key to its~/.ssh/authorized_keys. - Confirm that key login works. Don't move on until you can connect as the new user in a separate terminal.
- Turn off password and root login. Set these lines in
/etc/ssh/sshd_config:PasswordAuthentication no PermitRootLogin no
Then restart the service withsudo systemctl restart ssh. On some distributions the service is calledsshd. - Keep SSH open in the firewall. If you use
ufw, runsudo ufw allow OpenSSHbefore enabling the firewall, or you will lock yourself out. - Install Fail2ban. It temporarily blocks IP addresses that fail to log in repeatedly.
Moving SSH from port 22 to another number cuts down log noise, but it is not a security measure on its own. Key login is what actually protects you.
If you do lock yourself out, don't panic: the web console (VNC) in the Nodesty customer panel gives you the server's screen independently of SSH, so you can fix the setting from there.
Common SSH errors
- Connection refused: The SSH service is not running on the server, or you are using the wrong port. Check the service with
systemctl status sshfrom the web console. - Connection timed out: The server can't be reached at all. Check the IP address, that the server is running and that the SSH port is open in the firewall.
- Permission denied (publickey): The server expects a key but you are not sending the right one. Make sure the public key is in the right user's
authorized_keysand that permissions are correct (700 for~/.ssh, 600 forauthorized_keys). - REMOTE HOST IDENTIFICATION HAS CHANGED: The server's fingerprint has changed. If you reinstalled the server, that is expected; remove the old entry with
ssh-keygen -R 203.0.113.10and connect again. If you didn't, be careful.
When do you need SSH?
SSH is the basic tool for any Linux server you manage yourself, whether it is a VPS, a dedicated server or a game server. On shared web hosting, the provider manages the server; you use the control panel and FTP, and you don't need SSH.
Nodesty's AMD Ryzen 9 9950X VPS and AMD EPYC 7763 VPS plans come with full root access. OpenSSH is preinstalled on Ubuntu, Debian and AlmaLinux, your login details appear in the panel as soon as setup finishes, and the web console is always there if SSH access breaks.
Frequently Asked Questions
What port does SSH use?
SSH uses TCP port 22 by default. You can change it in /etc/ssh/sshd_config on the server; you then specify the port when connecting, for example ssh -p 2222 user@ip.
Do I need PuTTY to use SSH on Windows?
No. Windows 10 and Windows 11 include the OpenSSH client, so you can run the ssh command directly in PowerShell or Command Prompt. PuTTY still works, but it is no longer required.
What happens if I lose my SSH key?
Without the private key you cannot log in with that key. If you have disabled password login, connect through your provider's web console (VNC) and add a new public key. Protect your private key with a passphrase and keep a secure backup.
What is the difference between SSH and SFTP?
SFTP is a file transfer protocol that runs over an SSH connection. You log in with the same user, password or key, and you can manage files on the server by drag and drop with programs like FileZilla or WinSCP.
Does web hosting include SSH access?
Nodesty web hosting runs on shared servers, so SSH access is not provided for security reasons; you manage your files through the control panel and FTP. If you need SSH and root access, a VPS is the better fit.
Do I connect to a Windows VPS with SSH?
Windows servers are usually managed over Remote Desktop (RDP), on port 3389 by default. You can install the OpenSSH server on Windows Server to use SSH as well, but Remote Desktop is more practical for the first connection.
About the author
Nodesty Team · Infrastructure & Support
The Nodesty team runs our servers, network and DDoS protection day to day and answers customer support requests around the clock. These guides come from that work.
Related articles

How to Upgrade Ubuntu Server to the Next LTS Release
How to upgrade an Ubuntu server to the next LTS release: backups, preparation, do-release-upgrade, SSH access, post-upgrade checks and a clean install.

What Is a Load Balancer and How Does It Work?
What is a load balancer and what does it do? Balancing methods, health checks, session handling, load balancing with Nginx, HAProxy and when you need one.

How to Deploy a Laravel App to a VPS
How to deploy Laravel to a server: PHP-FPM, Composer, .env, the database, file permissions, Nginx, queue workers, the scheduler, SSL and shipping updates.