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.
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:
| Information | Description |
|---|---|
| Server IP Address | Viewable from the REXE panel |
| Username | Usually root (Linux) |
| Password | Sent via email after setup |
| Port | Default: 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
- Open PuTTY
- Enter your server IP address in the Host Name field
- Make sure the Port field is set to 22
- Connection type should be SSH
- Click the Open button
Step 3: Authentication
A server fingerprint warning will appear on first connection. Click Accept to continue. Then:
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:
ssh root@SERVER_IP_ADDRESS
If using a custom port:
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:
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:
ssh-keygen -t ed25519 -C "your@email.com"
Accept the default location and optionally set a passphrase.
Step 2: Copy Public Key to Server
ssh-copy-id root@SERVER_IP_ADDRESS
Or manually:
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:
sudo nano /etc/ssh/sshd_config
Find and change the following line:
PasswordAuthentication no
Restart the SSH service:
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:
sudo nano /etc/ssh/sshd_config
Port 2222
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:
adduser newuser
usermod -aG sudo newuser
Install Fail2Ban
To automatically block failed login attempts:
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:
- Log in to Path Panel or the Rule Management product in your customer panel
- Click on the relevant IP address
- Create a new filter rule:
- Protocol: TCP
- Destination Port: 22 (or your new port if changed)
- Description: SSH access
- 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
| Issue | Solution |
|---|---|
| Connection refused | SSH service may not be running. Restart the server from the REXE panel |
| Connection timed out | Path.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 denied | Wrong password or incorrect key file |
| Host key verification failed | Remove 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.
Related Articles
How to Connect to Windows VDS via RDP: Complete Guide
Complete guide to connecting to Windows Server VDS via Remote Desktop (RDP): setup steps, NLA security, Path Panel firewall rule, and troubleshooting tips.
How to Change VDS Server OS: Step-by-Step Reinstall Guide
Step-by-step guide to changing your VDS server OS via REXE panel: backup tips, supported Linux distributions and Windows Server versions explained.
Linux VDS Server Monitoring: CPU, RAM, Disk and Network
Complete guide to monitoring Linux VDS server resources: htop, free, df, iostat commands, network monitoring tools, and automated alert scripts.