Knowledgebase | VPSGrid
English
EnglishBeta EspañolPortuguês (Brasil)Coming soonFrançaisComing soonDeutschComing soon
Client Area

Cannot Connect to Linux VPS with SSH

KB-171, Troubleshooting, VPSGrid, unmanaged 0 found helpful

Cannot Connect to Linux VPS with SSH

Short answer

If SSH will not connect, verify the primary IP in the client area, test nc -zv IP 22, check UFW and sshd status, and use noVNC if locked out. Timeout usually means a firewall drop; immediate refuse means nothing is listening — see Website Shows Connection Refused.

Overview

VPSGrid Linux VPS customers where ssh user@ip hangs or times out — distinct from authentication failures (wrong password) or immediate connection refused.

VPSGrid sells unmanaged VPS with root or administrator access. Guest OS configuration, application data, backups, and patching inside the VM are your responsibility unless a separate product is documented. Review What Is an Unmanaged VPS at VPSGrid? and Security Responsibilities on Unmanaged VPS before expecting support to perform stack work.

US-Based VPS infrastructure

VPSGrid provides unmanaged Linux and Windows VPS on US-Based KVM infrastructure with NVMe storage and Proxmox virtualization. You manage the guest OS, applications, backups, and security. Current plan specifications appear at checkout on vpsgrid.net — articles do not publish fixed pricing.

Decision guidance: timeout vs refused vs auth failure

SymptomLikely causeGuide
Hang then timeoutFirewall filter, wrong IP, network blockThis article
Connection refused immediatelysshd down or wrong portWebsite Shows Connection Refused
Permission deniedWrong password or keySSH Key Authentication Setup

Step 1: Verify IP and service status

Confirm VPS status is Active in client area. Copy primary IP — typos cause timeouts to wrong hosts.

ping -c 3 PRIMARY_IP
What it does
ICMP echo test to VPS IPv4.
Why it matters
Confirms basic reachability — note some networks block ping.
Expected result
Replies received or explicit unreachable — not indefinite hang.
If it fails
100% loss may still allow TCP 22 — test port explicitly.
nc -zv PRIMARY_IP 22
What it does
Tests TCP connectivity to SSH port.
Why it matters
Distinguishes firewall drop (timeout) vs refused vs open.
Expected result
Connected or refused quickly — not long hang.
If it fails
Timeout suggests firewall/filter between you and VPS.

Step 2: Local network checks

Try SSH from another network (mobile hotspot) to rule out ISP or corporate firewall blocking outbound 22. VPN may also interfere. Optional path trace:

mtr -rwzc 10 PRIMARY_IP
What it does
Combines ping and traceroute with per-hop loss stats.
Why it matters
Identifies whether packets drop at ISP vs VPS path.
Expected result
Final hop shows loss% near VPS if network issue.
If it fails
mtr not installed — apt install mtr or use traceroute.

Step 3: Guest OS firewall (UFW)

ufw status verbose
What it does
Lists UFW rules and default policies.
Why it matters
UFW may deny 22 after hardening without allow rule.
Expected result
Status active with 22 ALLOW or inactive.
If it fails
If locked out, use noVNC and allow 22 — How to Configure UFW Firewall on Ubuntu/Debian.
Allow SSH before enabling UFW

Run ufw allow OpenSSH (or ufw allow 22/tcp) before ufw enable. Custom SSH port requires ufw allow 2222/tcp matching sshd_config Port directive.

Step 4: sshd service

systemctl status ssh
What it does
Shows OpenSSH server state on Debian/Ubuntu.
Why it matters
sshd must listen on 0.0.0.0:22 or correct interface.
Expected result
Active (running) with listening socket.
If it fails
Start with systemctl start ssh; check logs journalctl -u ssh.

Troubleshooting matrix

SymptomLikely causeWhat to check
nc timeoutNetwork or UFW dropUFW allow 22; verify IP; use noVNC
nc refusedsshd down or wrong portWebsite Shows Connection Refused
Works on hotspot onlyLocal ISP blocks 22Use VPN or alternate SSH port with UFW allow
Auth fails after connectCredentials/keysSSH Key Authentication Setup

Verify

  1. Successful ssh root@PRIMARY_IP or sudo user login with stable session
  2. UFW shows allow rule for SSH port in use
  3. sshd active: systemctl is-active ssh returns active

Security considerations

Prefer SSH keys over passwords — Basic Linux VPS Security Checklist. Fail2ban reduces brute force after opening port 22 — Fail2ban Setup on VPSGrid Linux VPS.

ISP and corporate firewall blocks on port 22

Some ISPs block outbound port 22 on residential connections. Corporate networks may require VPN. Symptom: timeout from office, works from mobile hotspot. Remediation: VPN, alternate SSH port with UFW allow, or jump host — not a VPSGrid infrastructure defect.

VPSGrid infrastructure vs guest OS scope

If primary IP is correct, nc to port 22 times out from multiple networks, and UFW/sshd are confirmed via noVNC, open a support ticket with service ID, primary IP, nc output, and mtr summary. Support verifies hypervisor networking — you verify guest OS firewall and sshd.

Capture baseline metrics first

Save command output before changes so you can compare after remediation and attach evidence to support tickets if needed.

Read-only diagnosis first

Prefer inspection commands that do not delete data until you identify root cause.

External monitoring correlation

Match external uptime monitor timestamps with auth and application logs.

Next learning step

Harden access with SSH Key Authentication Setup after SSH works.

Frequently Asked Questions

Why does SSH timeout to my VPSGrid VPS?

Common causes: wrong IP, local firewall, VPSGrid-side UFW blocking port 22, sshd not running, network issue, or ISP blocking outbound 22. Verify primary IP in client area and see How to Connect via SSH to Your VPSGrid Linux VPS.

Should I open SSH to the world?

Many admins allow port 22 globally with key-based auth and Fail2ban — Fail2ban Setup on VPSGrid Linux VPS. Restricting to your IP in UFW reduces brute force noise.

Can VPSGrid fix SSH for me?

Support assists with infrastructure reachability. Guest OS sshd configuration, UFW, and keys inside the VM are customer responsibility per Security Responsibilities on Unmanaged VPS.

SSH timeout vs connection refused?

Timeout often means packets dropped (firewall/filter). Connection refused means host reachable but nothing listens on port 22 — see Website Shows Connection Refused.

Related Articles

Next steps on VPSGrid

Prepare your environment on a VPSGrid Linux VPS when you are ready — verify primary IP in the client area before troubleshooting SSH.

Need More Help?

Search this knowledgebase for related guides. If the issue appears infrastructure-related (provisioning, billing, primary IP assignment), open a ticket at billing.vpsgrid.net with your service ID, primary IP, and steps already tried. See What Information to Include in a Support Request and Security Responsibilities on Unmanaged VPS for scope.

Was this answer helpful?

Related Articles