There was a problem loading the comments.

Can't SSH Into My VPS

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

If you can't connect to your VPS via SSH, work through these steps in order. Each step narrows down the cause.

 

Step 1: Is Your VPS Running?

Log in to the VirtFusion panel and check your server's status. It should show "Running". If it's stopped, start it. If it's stuck, try a force stop and then start.

 

Step 2: Can You Ping It?

ping your-vps-ip

 

If you get no response, the issue is likely network or firewall related. If you get replies, the server is reachable and the problem is SSH-specific.

 

Step 3: Is SSH Running?

Use the VNC console to log in directly, then check:

# Ubuntu/Debian
systemctl status ssh

# AlmaLinux/Rocky/CentOS
systemctl status sshd

 

If SSH isn't running, start it:

# Ubuntu/Debian
systemctl start ssh

# AlmaLinux/Rocky/CentOS
systemctl start sshd

 

Step 4: Is a Firewall Blocking Port 22?

Check your firewall rules (use whichever applies to your OS):

# UFW (Ubuntu)
ufw status

# iptables
iptables -L -n | grep 22

# firewalld (AlmaLinux/Rocky)
firewall-cmd --list-all

 

If port 22 is blocked, allow it:

# UFW
ufw allow 22/tcp

# firewalld
firewall-cmd --permanent --add-service=ssh
firewall-cmd --reload

 

Step 5: Check SSH Configuration

Via VNC, inspect the SSH config:

grep -i "port\|permitrootlogin\|passwordauthentication" /etc/ssh/sshd_config

 

Common issues:

  • Port: If it's not 22, you need ssh -p PORT root@your-ip
  • PermitRootLogin no: Root login is disabled. Change to yes or use a non-root user.
  • PasswordAuthentication no: Only key-based auth is allowed. You'll need to add your SSH key or change this to yes.

After changing config, restart SSH:

systemctl restart sshd

 

Step 6: Is Your Disk Full?

df -h

 

If / is at 100%, SSH may fail to start or accept connections. Free up space:

# Clear old logs
journalctl --vacuum-size=50M

# Find large files
du -sh /* | sort -rh | head -10

 

Step 7: Authentication Issues

  • Wrong password: Reset your root password from the VirtFusion panel.
  • SSH key mismatch: Ensure your local ~/.ssh/id_rsa.pub is in the server's ~/.ssh/authorized_keys.
  • "Connection refused": SSH service isn't running or is on a different port.
  • "Connection timed out": Firewall or network issue — the VPS can't be reached.

 

Last Resort: Reinstall OS

If nothing works and you don't have important data on the VPS, you can reinstall the operating system from the VirtFusion panel. This will wipe all data and give you a clean start.


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

© EZSCALE Hosting, LLC