TROUBLESHOOTING

Cannot Connect to Server

Updated: December 2024
10 min read

Unable to connect to your server? This guide will help you diagnose and fix common connection issues with SSH, RDP, and network connectivity.

Quick Diagnostic Checklist

Step 1: Verify Server Status

Check If Server is Online

# Ping the server
ping your_server_ip

# Expected: Reply from IP address
# Problem: Request timeout or Destination unreachable

Note

Some servers have ICMP (ping) disabled for security. If ping fails, try other tests.

Check Server Power Status

  1. 1. Log into your X-ZoneServers client portal
  2. 2. Navigate to your server control panel
  3. 3. Check if server status shows "Running" or "Online"
  4. 4. If "Stopped", click "Start" or "Power On"

Step 2: Test Network Connectivity

Check if Port is Open

# Test SSH port (Linux/Mac)
nc -zv your_server_ip 22

# Test SSH port (Windows PowerShell)
Test-NetConnection -ComputerName your_server_ip -Port 22

# Test RDP port
Test-NetConnection -ComputerName your_server_ip -Port 3389

# Alternative: Use telnet
telnet your_server_ip 22

Trace Network Route

# Linux/Mac
traceroute your_server_ip

# Windows
tracert your_server_ip

This shows where the connection is failing in the route to your server.

Step 3: SSH Connection Issues (Linux/Mac)

Common SSH Errors

"Connection refused"

Causes:

  • • SSH service is not running
  • • Wrong port number
  • • Firewall blocking connection

Solutions:

# Check if SSH is running (via console) sudo systemctl status sshd # Start SSH service sudo systemctl start sshd # Try different port ssh -p 2222 user@server_ip

"Connection timed out"

Causes:

  • • Server firewall blocking connection
  • • Your ISP blocking SSH port
  • • Server is offline
  • • Network connectivity issue

Solutions:

  • • Check UFW/iptables rules (via console)
  • • Try from different network
  • • Contact X-ZoneServers support

"Permission denied (publickey)"

Causes:

  • • SSH key not authorized
  • • Wrong username
  • • Password auth disabled

Solutions:

# Try with password ssh -o PreferredAuthentications=password user@server_ip # Specify key file ssh -i ~/.ssh/id_rsa user@server_ip # Verbose mode to debug ssh -vvv user@server_ip

"Host key verification failed"

Cause: Server's SSH key changed (server reinstalled)

Solution:

# Remove old key ssh-keygen -R your_server_ip # Connect again ssh user@your_server_ip

Step 4: RDP Connection Issues (Windows)

Common RDP Errors

RDP Not Enabled

Enable via control panel console:

  1. 1. Open Server Manager
  2. 2. Go to Local Server → Remote Desktop
  3. 3. Enable Remote Desktop
  4. 4. Add users to "Remote Desktop Users" group

Windows Firewall Blocking

Allow RDP through firewall:

# PowerShell command Enable-NetFirewallRule -DisplayGroup "Remote Desktop" # Or manually: # Control Panel → Firewall → Allow an app # Check "Remote Desktop"

Network Level Authentication (NLA) Issues

Disable NLA temporarily:

  1. 1. System Properties → Remote tab
  2. 2. Uncheck "Allow connections only from computers running Remote Desktop with NLA"

Step 5: Firewall Troubleshooting

Check Server Firewall (UFW)

Access via web console or recovery mode:

# Check UFW status
sudo ufw status verbose

# Allow SSH
sudo ufw allow 22/tcp

# Allow from specific IP only
sudo ufw allow from your_ip to any port 22

# Disable UFW temporarily (CAREFUL!)
sudo ufw disable

Check Local Firewall (Your Computer)

Windows:

  • • Windows Defender Firewall → Advanced settings
  • • Check Outbound Rules for blocks
  • • Temporarily disable to test

Mac:

  • • System Preferences → Security & Privacy → Firewall
  • • Firewall Options → Allow SSH/Terminal

Step 6: DNS Issues

If using a domain instead of IP:

# Check DNS resolution
nslookup your-domain.com
dig your-domain.com

# Use IP address directly instead
ssh [email protected]

# Clear DNS cache (Windows)
ipconfig /flushdns

# Clear DNS cache (Mac)
sudo dscacheutil -flushcache

# Clear DNS cache (Linux)
sudo systemd-resolve --flush-caches

Emergency Access via Web Console

If you cannot connect via SSH/RDP, use the web console in your control panel:

  1. 1. Log into X-ZoneServers client portal
  2. 2. Navigate to your server
  3. 3. Click "Console" or "VNC Access"
  4. 4. You'll get direct terminal/desktop access
  5. 5. Fix SSH/RDP configuration from there

Pro Tip

Always keep one terminal/console session open when making firewall or SSH configuration changes. This prevents lockouts.

When to Contact Support

Contact X-ZoneServers support if:

  • Server shows "Running" but doesn't respond to any connections
  • You've tried all troubleshooting steps without success
  • Web console also doesn't work
  • You suspect a network issue on our end
  • Server was working, then suddenly stopped

Need Help?

Our 24/7 support team is ready to assist you

Submit Support Ticket

Was this article helpful?

Still stuck?

Get Support