How to connect to a server via SSH on Ubuntu, Debian, CentOS, and Windows
Read - 3 мин.
The article has been read - 71 раз
Updated - 19.06.2026
Published - 19.06.2026

How to connect to a server via SSH on Ubuntu, Debian, CentOS, and Windows

SSH (Secure Shell) is a secure network protocol for remotely managing Linux servers. It allows administrators to connect to VPS/VDS servers, execute commands, install software, change system settings, and manage files.

Almost all modern servers running Ubuntu, Debian, CentOS, AlmaLinux, and other Linux distributions use SSH for remote access.


What you'll need to connect

To connect to the server via SSH, you need the following information:

  • Server IP address;
  • Username;
  • User password or SSH key;
  • SSH port (default 22).

Example data:

IP: 176.XXX.XXX.XXX
User: root
Password: ********
Port: 22

Connecting to the server via SSH in Linux and Ubuntu

Most Linux distributions already include a built-in SSH client.

Open the terminal and run the command:

ssh root@SERVER_IP

Example:

ssh root@176.96.243.100

When you first connect, the system will ask:

Are you sure you want to continue connecting (yes/no)?

Enter:

yes

Then enter the user password.


Connecting to a server via SSH in Windows

Modern versions of Windows 10 and Windows 11 have an SSH client built into the system.

Open:

  • PowerShell;
  • Command Prompt (CMD);
  • Windows Terminal.

Run:

ssh root@SERVER_IP

For example:

ssh root@176.96.243.100

Enter the password and wait for the connection.


Connecting via PuTTY

PuTTY is one of the most popular SSH clients for Windows.

To connect:

  1. Launch PuTTY.
  2. In the Host Name field, enter the server IP.
  3. In the Port field, enter 22.
  4. Select the SSH connection type.
  5. Click Open.
  6. Enter your username and password.

After successful authorization, the server console will open.


Connecting to the server via a non-standard SSH port

If SSH is running on a port other than the standard 22, you must specify the port number manually.

For Linux and Windows:

ssh root@SERVER_IP -p 2222

Example:

ssh root@176.96.243.100 -p 2222

Connecting via SSH key

For increased security, it is recommended to use SSH keys instead of passwords.

Connect with the command:

ssh -i ~/.ssh/id_rsa root@SERVER_IP

Example:

ssh -i ~/.ssh/id_rsa root@176.96.243.100

Checking SSH Availability

If the connection fails, check the SSH port availability:

telnet SERVER_IP 22
or
nc -vz SERVER_IP 22

Example:

nc -vz 176.96.243.100 22

Common SSH Connection Errors

Connection refused

The SSH service is not running or the port is blocked by a firewall.

Check the status:

sudo systemctl status ssh

Connection timed out

The server is unreachable over the network or the SSH port is filtered by a router or firewall.


Permission denied

Incorrect login or password.

Check:

  • Username;
  • Password;
  • SSH key;
  • Authentication settings.

Useful SSH commands

Connecting:

ssh root@IP

Connecting on a different port:

ssh root@IP -p 2222

Transferring a file to the server:

scp backup.zip root@IP:/root/

Transferring a file from the server:

scp root@IP:/root/backup.zip .

Security Recommendations

  • Change the default SSH port.
  • Use SSH keys.
  • Disable root password login.
  • Configure Fail2Ban.
  • Restrict access by IP address.
  • Update your system regularly.

Conclusion

SSH is the primary management tool for Linux servers. With a single command, you can securely connect to your VPS/VDS server from anywhere in the world and perform necessary administrative tasks.

For most users, this is sufficient:

ssh root@SERVER_IP

After successful authorization, you will have full access to server management.


Order a VPS/VDS server with SSH access

All AIRNET virtual servers are provided with full SSH access and support for popular operating systems:

  • Ubuntu 18.04 / 22.04 / 24.04 / 26.04
  • Debian
  • AlmaLinux
  • Rocky Linux
  • CentOS

Choose the right plan and get started within minutes of ordering.

Order a VPS/VDS server →

Answers to popular questions

How soon can I start using the service?

The user account is opened immediately upon application.

You can start using the service immediately after payment.

Author of the article:

user

Editor-in-Chief

Danaev Almaz