CtrlOps
|Docs
Troubleshooting

Connection Issues

Common connection problems and solutions

Having trouble connecting to your server? This guide covers the most common connection problems and how to solve them.

Quick Diagnosis

Before diving into solutions, identify your specific error:

Error MessageLikely CauseJump To
"Connection timed out"Network/firewall issueTimeout Section
"Permission denied"Authentication problemPermission Section
"Network unreachable"Routing/DNS issueNetwork Section
"Connection refused"SSH not runningRefused Section
"Host key verification failed"Security warningHost Key Section

Connection Timed Out

What it means: Your computer can't reach the server at all.

Check Server Status

Ping the server:

ping your-server-ip
  • Replies received: Server is online, check firewall
  • Request timeout: Server may be down or blocking ICMP

Verify IP Address

Common mistakes:

  • Wrong IP address copied
  • Server IP changed (dynamic IPs)
  • Typo in IP address

Fix:

  1. Log into your hosting provider's control panel
  2. Verify the correct IP address
  3. Check if it's a public or private IP

Check Firewall Rules

Server firewall (UFW/iptables):

# On the server
sudo ufw status
sudo iptables -L | grep 22

Ensure port 22 (SSH) is allowed:

sudo ufw allow 22/tcp
sudo ufw reload

Cloud provider firewall:

  • AWS: Check Security Groups
  • DigitalOcean: Check Cloud Firewalls
  • GCP: Check VPC Firewall Rules
  • Azure: Check Network Security Groups

Make sure inbound TCP port 22 is allowed from your IP.

Network Connectivity

Test from another network:

  • Try mobile hotspot instead of WiFi
  • Use VPN if behind corporate firewall
  • Check if ISP is blocking port 22

Port Number

Is SSH running on a non-standard port?

Some servers use port 2222 or 8022 instead of 22.

Check in CtrlOps:

  1. Edit server settings
  2. Verify port number
  3. Common alternate ports: 2222, 8022, 443

Permission Denied

What it means: Server is reachable, but credentials are rejected.

Wrong Username

Most common mistake! Try these:

  • root (common default)
  • ubuntu (Ubuntu default)
  • ec2-user (AWS Amazon Linux)
  • centos (CentOS default)
  • debian (Debian default)

Verify username:

# If you have console access
cat /etc/passwd | grep /bin/bash

SSH Key Issues

Wrong key file:

  • Ensure you're using the correct .pem or .key file
  • Check key is not corrupted
  • Verify key format (OpenSSH vs PEM)

Key permissions too open:

# Fix permissions
chmod 600 ~/.ssh/your-key.pem

Key not added to server:

# On server, check authorized_keys
cat ~/.ssh/authorized_keys

Password Authentication

If using password (not recommended):

  • Ensure password is correct (case-sensitive!)
  • Check if password auth is enabled:
    # On server
    grep PasswordAuthentication /etc/ssh/sshd_config
  • Some cloud providers disable password auth by default

Account Locked

# Check if user is locked
sudo passwd -S username

# Unlock if needed
sudo passwd -u username

Network Unreachable

What it means: Your computer can't find a route to the server.

DNS Resolution

If using a hostname instead of IP:

nslookup your-hostname.com
dig your-hostname.com

Fix:

  • Use IP address instead of hostname
  • Check DNS records are correct
  • Wait for DNS propagation (can take 24-48 hours)

Routing Issues

Traceroute to see where connection fails:

traceroute your-server-ip
mtr your-server-ip

Common routing problems:

  • VPN conflicts
  • Corporate network restrictions
  • ISP routing issues

VPN/Proxy Conflicts

Temporarily disable:

  • VPN connections
  • Proxy settings
  • Corporate firewalls

Then test connection again.

Connection Refused

What it means: Server is online, but SSH service isn't accepting connections.

SSH Service Not Running

Check SSH status:

# systemd systems (most modern Linux)
sudo systemctl status ssh
sudo systemctl status sshd

# init.d systems
sudo service ssh status

Start SSH service:

sudo systemctl start sshd
sudo systemctl enable sshd  # Auto-start on boot

Wrong Port

Check SSH port:

# On server
grep Port /etc/ssh/sshd_config

Common scenario: SSH moved to port 443 (to bypass firewalls)

Server Resources Exhausted

Check if server is overloaded:

# On server (via console)
uptime
free -h
df -h

If load is very high (>10x CPU cores), SSH may refuse connections.

Host Key Verification Failed

What it means: Server's identity has changed. Security feature!

Why This Happens

Legitimate reasons:

  • Server was rebuilt/reinstalled
  • IP address reassigned to different server
  • SSH keys regenerated

Malicious reasons:

  • Man-in-the-middle attack
  • DNS hijacking

How to Fix

Remove old host key:

# Remove specific entry
ssh-keygen -R your-server-ip

# Or edit manually
nano ~/.ssh/known_hosts
# Delete line with your server's IP

In CtrlOps:

  1. Click the Edit (pencil) icon on the connection card.
  2. Verify all server details.
  3. If you have confirmed the key change is legitimate, you may need to manually remove the entry from your local known_hosts file as shown above.

Too Many Authentication Failures

What it means: SSH client offered too many keys.

Fix

Specify exact key:

ssh -i ~/.ssh/specific_key.pem user@server

Or disable SSH agent temporarily:

ssh -o IdentitiesOnly=yes user@server

Connection Closes Immediately

Shell Issues

Check user's shell:

grep username /etc/passwd

Should be /bin/bash or /bin/sh, not /bin/false or /usr/sbin/nologin

Account Expired

# Check account status
sudo chage -l username

Debugging Steps

Enable Verbose Mode

Get detailed error information:

ssh -vvv user@server-ip

This shows:

  • Which authentication methods tried
  • Where connection fails
  • Detailed error messages

Check Server Logs

On the server:

# Authentication logs
sudo tail -f /var/log/auth.log        # Debian/Ubuntu
sudo tail -f /var/log/secure          # CentOS/RHEL
sudo journalctl -u sshd -f            # systemd

Test from Another Machine

Helps isolate if issue is:

  • Client-side (your computer)
  • Server-side (SSH config)
  • Network-side (firewall/routing)

Prevention

Keep Backups

  • Console access credentials
  • Alternative connection methods
  • Server snapshot before major changes

Monitor SSH

Set up alerts for:

  • Multiple failed attempts
  • New IP addresses connecting
  • Unusual connection times

Use Jump Hosts

For additional security:

Your Computer → Jump Host → Target Server

Still Stuck?

Collect this information for support:

  1. Exact error message
  2. Server IP/hostname
  3. Username trying to connect
  4. Authentication method (key/password)
  5. Output of ssh -vvv
  6. Server logs from /var/log/auth.log

Still stuck? Contact our engineering team at daxesh@tsttechnology.in.

Pro Tip: Always have a backup way to access your server (console access, different network) before making SSH changes!

On this page