Skip to main content
Back to Category

How to Connect to Your VDS Server via SSH (Complete Guide)

Step-by-step SSH connection guide for Linux VDS: PuTTY, Terminal, key-based authentication, Path Panel firewall rules, and security best practices.

Read time: 10 min Server Management
sshputtyterminalconnectionlinuxsecurity

Table of Contents

Introduction

SSH (Secure Shell) is a network protocol that allows you to securely connect to remote servers. By connecting to your REXE Technology VDS server via SSH, you can gain full root access, install software, make configuration changes, and manage your server.

This guide covers SSH connection steps from Windows, macOS, and Linux operating systems in detail.

Prerequisites

You will need the following information before establishing an SSH connection:

InformationDescription
Server IP AddressViewable from the REXE panel
UsernameUsually root (Linux)
PasswordSent via email after setup
PortDefault: 22

Your server credentials are automatically sent to your email address after ordering. Don't forget to check your spam folder.

Connecting with PuTTY on Windows

PuTTY is the most commonly used SSH client on Windows.

Step 1: Download PuTTY

Download PuTTY from the official website: putty.org

Step 2: Connection Settings

  1. Open PuTTY
  2. Enter your server IP address in the Host Name field
  3. Make sure the Port field is set to 22
  4. Connection type should be SSH
  5. Click the Open button

Step 3: Authentication

A server fingerprint warning will appear on first connection. Click Accept to continue. Then:

hljs bash
login as: root
root@SERVER_IP's password: YOUR_PASSWORD

Characters won't appear on screen while typing your password. This is a normal security measure.

Connecting via Windows 10/11 Terminal

Windows 10 and later versions include a built-in OpenSSH client:

hljs bash
ssh root@SERVER_IP_ADDRESS

If using a custom port:

hljs bash
ssh -p PORT_NUMBER root@SERVER_IP_ADDRESS

Connecting from macOS and Linux

On macOS and Linux, you can establish SSH connections directly via the Terminal application:

hljs bash
ssh root@SERVER_IP_ADDRESS

Fingerprint confirmation will be requested on first connection. Type yes to continue.

SSH Key-Based Authentication

Using SSH keys instead of passwords is both more secure and more practical.

Step 1: Generate Key Pair

Run the following command on your local computer:

hljs bash
ssh-keygen -t ed25519 -C "your@email.com"

Accept the default location and optionally set a passphrase.

Step 2: Copy Public Key to Server

hljs bash
ssh-copy-id root@SERVER_IP_ADDRESS

Or manually:

hljs bash
cat ~/.ssh/id_ed25519.pub | ssh root@SERVER_IP_ADDRESS "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

Step 3: Disable Password Login

After key-based login works, you can disable password authentication:

hljs bash
sudo nano /etc/ssh/sshd_config

Find and change the following line:

hljs bash
PasswordAuthentication no

Restart the SSH service:

hljs bash
sudo systemctl restart sshd

Key-based authentication is the most effective protection against brute-force attacks.

SSH Security Tips

Change the Default Port

Moving the SSH port from 22 to a different port reduces automated scanning attacks:

hljs bash
sudo nano /etc/ssh/sshd_config
hljs bash
Port 2222
hljs bash
sudo systemctl restart sshd

After changing the port, don't forget to add the new port as a filter rule in the REXE Path panel.

Restrict Root Login

Creating a regular user and using sudo is more secure than direct root login:

hljs bash
adduser newuser
usermod -aG sudo newuser

Install Fail2Ban

To automatically block failed login attempts:

hljs bash
sudo apt install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2ban

Path Panel Firewall Settings

On REXE servers, when an IP has no rules at all, all ports are open. However, the moment you create your first filter rule, the system automatically adds Default Block and only the ports you allow stay open. To secure your SSH access (and to maintain access if your IP already has other rules), create a filter rule for the SSH port (22) via Path Panel or the Rule Management product in your customer panel:

  1. Log in to Path Panel or the Rule Management product in your customer panel
  2. Click on the relevant IP address
  3. Create a new filter rule:
    • Protocol: TCP
    • Destination Port: 22 (or your new port if changed)
    • Description: SSH access
  4. Wait for the rule to reach propagated status (2-5 minutes)

The moment you create your first rule, Default Block kicks in automatically and all disallowed ports are closed. For this reason, to avoid losing SSH access, always include the SSH port (22) in your first rule set. Create the rule via Path Panel or the Rule Management product in your customer panel by entering Protocol TCP and Destination Port 22 (standard filter mode). The rule creation screen has two modes: standard filter (protocol + port only) and hard filter (Layer7 filters like TCP Symmetric). For SSH the standard mode is enough; hard filter (Layer7) options like TCP Symmetric should only be enabled for highly sensitive applications.

Common Issues

IssueSolution
Connection refusedSSH service may not be running. Restart the server from the REXE panel
Connection timed outPath.net firewall may be blocking the SSH port. If your IP has rules, Default Block is active; create a filter rule for the SSH port (22)
Permission deniedWrong password or incorrect key file
Host key verification failedRemove the old entry from ~/.ssh/known_hosts

Conclusion

SSH is the most fundamental and secure way to manage your VDS server. You can significantly improve your server's security with measures like key-based authentication, port changes, and Fail2Ban. If you experience connection issues, don't forget to check the Path panel firewall settings.