EN · $ USD
VDS and Linux Server Management

How to SSH Into a Server (Windows, Mac and Linux)

7 min read Updated: Sunucu Atlas technical team

In short

To connect over SSH you need the server's IP address, a username (usually root) and a password or SSH key. On Windows 10 and 11 you run ssh root@IP_ADDRESS in PowerShell or Windows Terminal; on macOS and Linux you run it in Terminal. On the first connection you type yes to accept the server's host key fingerprint, then enter your password; it stays invisible while you type.

In this guide
  1. What Is SSH?
  2. What You Need Before Connecting
  3. Windows: Connecting with Windows Terminal or PowerShell
  4. macOS and Linux: Connecting with Terminal
  5. What Does the Host Key Warning Mean?
  6. First Commands After You Connect
  7. Make Connecting Easier: The SSH Config File
  8. Do Not Lose Your Work When the Connection Drops: tmux
  9. Quick Tips for Working Comfortably in the Terminal
  10. Common SSH Errors
  11. Next Step: Secure Your Connection

To SSH into a server you need three things: the server's IP address, a username (usually root on a new Linux VPS) and a password or SSH key. On Windows 10 and 11, open PowerShell or Windows Terminal; on macOS and Linux, open Terminal; then type ssh root@IP_ADDRESS. On the first connection you are asked to confirm the server's identity; after that you enter your password and land at the command prompt. This guide walks through the steps for each operating system, explains what the host key warning means and lists the first commands to run once you are in.

What Is SSH?

SSH (Secure Shell) is a protocol that gives you command-line access to a remote server over an encrypted channel. By default it uses TCP port 22. Your commands, your password and the server's output are encrypted end to end, which is why SSH has completely replaced old-school Telnet.

With SSH you install software, edit files, manage services and read logs. On a VPS without a control panel, it is the main way to manage the server. If you do not have a server yet, you can follow this guide with one of our Intel Premium VDS plans, which come with root access.

What You Need Before Connecting

  • IP address: Your server's public IPv4 address (we use 203.0.113.10 in the examples).
  • Username: Usually root on a freshly installed Linux server.
  • Password or key: The password from your server delivery details or an SSH key you uploaded earlier.
  • Port: 22, unless it has been changed.

Windows: Connecting with Windows Terminal or PowerShell

Recent versions of Windows 10 and Windows 11 ship with a built-in OpenSSH client, so you do not need to install anything.

  1. Open Terminal or PowerShell from the Start menu.
  2. Check that the client is installed: ssh -V should print an OpenSSH version.
  3. Connect: ssh root@203.0.113.10
  4. When asked to confirm the host's authenticity on the first connection, type yes and press Enter.
  5. Type your password and press Enter. For security, no characters appear on screen while you type the password; this is normal.

If the ssh command is not recognized, add the OpenSSH client under Settings > System > Optional features, or run this command in PowerShell opened as administrator:

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

Connecting with PuTTY

If you prefer a graphical interface or use an older version of Windows, PuTTY is a good option. Only download PuTTY from its official website.

  1. Open PuTTY and enter the IP address in the Host Name (or IP address) field.
  2. Make sure Port is 22 and Connection type is set to SSH.
  3. To reuse the settings, type a name under Saved Sessions and click Save.
  4. Click Open to connect. In the PuTTY Security Alert window that appears on the first connection, choose Accept.
  5. At the login as: prompt, type root, then your password.

To paste copied text in PuTTY, just right-click inside the window; any text you select is copied to the clipboard automatically.

macOS and Linux: Connecting with Terminal

macOS and all major Linux distributions come with the OpenSSH client preinstalled. Open Terminal and use the same command:

ssh root@203.0.113.10

# If the SSH port has been changed:
ssh -p 2222 root@203.0.113.10

What Does the Host Key Warning Mean?

The first time you connect to a server, you 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:Xb3k...
Are you sure you want to continue connecting (yes/no/[fingerprint])?

The host key is the server's own identity key. Your SSH client does not recognize it on the first connection, so it asks for your approval. When you type yes, the fingerprint is saved to the ~/.ssh/known_hosts file on your computer (on Windows, C:\Users\<username>\.ssh\known_hosts) and is verified automatically on later connections. That way, an impostor server sitting in the middle gets caught.

If you want to be thorough, connect through a second channel such as the server's web console and compare the fingerprint with this command:

ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

The "REMOTE HOST IDENTIFICATION HAS CHANGED" Warning

This warning tells you that the key the server presents does not match the saved fingerprint. If you reinstalled the server, this is expected, because a fresh install generates a new host key. Delete the old entry and connect again:

ssh-keygen -R 203.0.113.10

If you did not reinstall the server and still see this warning, do not continue; something may be wrong on the network. Do not enter your password until you have verified what is going on.

First Commands After You Connect

Once you reach the command prompt, start with these commands to get to know the server:

CommandWhat it does
whoamiShows which user you are logged in as
hostnamectlHostname, operating system and kernel version
uptimeHow long the server has been up, plus load average
free -hRAM and swap usage
df -hDisk usage per partition
ip aNetwork interfaces and IP addresses
passwdChanges the current user's password
exitEnds the session

On Ubuntu or Debian, your first job should be updating packages:

apt update && apt upgrade -y

A small machine is enough to practice with SSH and explore server resources: the SA-XEON-1 plan, with 2 vCPUs, 2 GB of RAM and a 30 GB NVMe disk, comes with root access and is a good starting point for learning Linux, building a test environment or running a small service.

Make Connecting Easier: The SSH Config File

Instead of typing the IP, user and port every time, add a short entry to the ~/.ssh/config file on your computer (on Windows, C:\Users\<username>\.ssh\config):

Host atlas
    HostName 203.0.113.10
    User root
    Port 22
    ServerAliveInterval 60

Now all you need to type is ssh atlas. The ServerAliveInterval line keeps the connection from dropping when you are idle for a long time.

To transfer files, use scp with the same connection details:

# From your computer to the server
scp yedek.zip atlas:/root/

# From the server to your computer
scp atlas:/var/log/syslog ./syslog.txt

# Use -r to send an entire folder
scp -r ./site atlas:/var/www/

If you prefer managing files in a graphical interface, connect with any file client that supports SFTP by choosing SFTP as the protocol and 22 as the port, with the same username and password. Because SFTP runs over SSH, you do not need to install a separate FTP server and transfers are encrypted.

Do Not Lose Your Work When the Connection Drops: tmux

A long task you start in an SSH session (downloading a large file, importing a database, running a system update) can die along with the session if your internet connection drops. The easiest way to prevent this is tmux. tmux opens a terminal session on the server that lives independently of you; even if the connection drops, the process inside keeps running.

sudo apt install tmux -y     # usually preinstalled on Ubuntu/Debian
tmux new -s islem            # opens a new session named "islem"
# ... run your long command ...
# To detach from the session: Ctrl+b, then d

tmux ls                      # lists open sessions
tmux attach -t islem         # returns to the session after you reconnect

Quick Tips for Working Comfortably in the Terminal

  • Copy and paste: Use Ctrl+Shift+C / Ctrl+Shift+V in Windows Terminal and Cmd+C / Cmd+V in macOS Terminal. In a terminal, Ctrl+C does not copy; it stops the running command.
  • Tab completion: Type the first few letters of a file or command name and press Tab to complete the rest.
  • Command history: The up arrow brings back previous commands; Ctrl+R searches your history.
  • Help: See how a command works with man command or command --help.

Common SSH Errors

ErrorLikely causeCheck first
Connection refusedThe SSH service is not running or listens on a different portPort number, systemctl status ssh
Connection timed outFirewall, wrong IP or the server is downIP address, firewall rules
Permission deniedWrong password, wrong user or a key problemUsername, keyboard layout (special characters)
Host key verification failedThe saved host key has changedssh-keygen -R IP_ADDRESS

For a detailed diagnosis of these errors, see How to Fix SSH Connection Refused and Connection Timed Out Errors.

Next Step: Secure Your Connection

Logging in as root with a password is fine for the first login, but it should not be the permanent method on an internet-facing server. Do the following, in order:

  1. Change your password to a strong, unique one.
  2. Create an SSH key and disable password login.
  3. Apply the first 10 security steps for a new Ubuntu server: a sudo user, a firewall and automatic updates.

If you need a server to practice these steps on, Sunucu Atlas's KVM-based Intel Xeon VDS plans in our Istanbul data center come with NVMe storage, layered DDoS protection and full root access; if you get stuck, open a support ticket and our team will help.

Frequently asked questions

Which port does SSH use?

SSH uses TCP port 22 by default. If the port has been changed on the server, specify it when connecting, in the form ssh -p PORT user@IP.

Do I have to install PuTTY to use SSH on Windows?

No. Recent versions of Windows 10 and Windows 11 ship with a built-in OpenSSH client, so you can use the ssh command directly in PowerShell or Windows Terminal. PuTTY is just an alternative for people who prefer a graphical interface.

Why does nothing appear when I type my password in SSH?

It is a security measure; no asterisks or characters are shown while you type the password. Just type your password and press Enter.

Why do I get the REMOTE HOST IDENTIFICATION HAS CHANGED warning?

It appears when the server's host key differs from the one saved on your computer, which is normal if you reinstalled the server. In that case, delete the old entry with ssh-keygen -R IP_ADDRESS and reconnect; if you did not reinstall, verify what is going on before you continue.

How do I send files to a server over SSH?

With the same SSH details, use scp file.zip root@IP_ADDRESS:/root/. If you prefer a graphical interface, you can also connect with any file client that supports SFTP.

For this guide

Recommended plans

Whether you are learning to manage a server over SSH or launching a real project, Intel Premium VDS plans give you KVM virtualization, NVMe storage and full root access, and SA-XEON-1 is a small, capable plan to take your first step.

SA-XEON-1

XEON
Recommended

2 GB RAM

$2.95/mo

+VAT

  • Processor2 vCPU
  • ModelIntel Xeon
  • Disk30 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

SA-XEON-2

XEON

4 GB RAM

$3.93/mo

+VAT

  • Processor2 vCPU
  • ModelIntel Xeon
  • Disk40 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

SA-XEON-3

XEON

6 GB RAM

$4.91/mo

+VAT

  • Processor2 vCPU
  • ModelIntel Xeon
  • Disk50 GB NVMe
  • LocationIstanbul
  • Port: 1G Port
  • Traffic: Fair use
  • Virtualization: KVM
  • Multi-layer DDoS protection

Intel Premium VDS — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.