Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
SSH Connection Timed Out: Check Port and Firewall | Eka Server
SSH CONNECTION DIAGNOSIS

SSH Connection Timed Out: Fix Custom Ports, sshd, CSF and cPHulk

An SSH timeout happens before password validation. The first suspects are therefore the target address, port, route, firewall and sshd listening state, not the username or password. “Connection refused” and “connection timed out” represent different failure layers and require different actions.

TIMEOUTTCP session was not established
REFUSEDThe target actively rejected the connection
sshd -tConfiguration syntax validation
PUBLIC KEYSafer administration than passwords
01
DIAGNOSIS

Separate the symptoms by technical layer

The same error screen can originate from different services. Separate network reachability, service state, firewall policy and authentication before changing anything.

Connection timed out

The client sends traffic but receives no permitted response; prioritize network and firewall checks.

Connection refused

The host is reachable, but no service listens on the port or a REJECT rule is active.

Permission denied

TCP and the SSH handshake succeeded; inspect the account, key or password.

Works from one network only

Source-address filtering, corporate egress policy or a different CGNAT path is involved.

02
ROOT CAUSE

Investigate the most likely causes in risk order

Instead of disabling the entire protection stack, prove which rule blocks access and change only the required scope.

High

Wrong custom port in the client

The server may listen on 3458 while the client still targets port 22 or an old value.

High

Custom port missing from the firewall

An sshd_config change cannot bypass CSF TCP_IN or a closed provider firewall.

Medium

sshd was not reloaded or the configuration is invalid

The service may still use the old configuration or fail validation.

Medium

Source address blocked by cPHulk, CSF or Fail2ban

Successful access from a different connection strongly supports an address-specific block.

03
SAFE REMEDIATION FLOW

Apply each step in order and keep it reversible

Back up the current configuration, validate syntax and keep a second administration session open before every service or firewall change.

01

Verify the client target

Check address, port, user and proxy or tunnel fields; do not confuse a tunneling notice with TCP failure.

02

Test the TCP port externally

Use nc or Test-NetConnection from the same client network.

03

Check the listening socket from console

Inspect the real sshd port, service state and recent journal messages.

04

Validate sshd_config syntax

Do not restart sshd unless sshd -t succeeds, and keep the working session open.

05

Search firewall and ban lists

Check the port and source in CSF, then inspect cPHulk and Fail2ban jail state.

06

Prove a new session before closing the old one

Open a second public-key session successfully before ending the current root connection.

04
COMMANDS

Run commands as root and replace sample values

Replace example IP addresses, ports and paths with your own values. Review command output before moving to the next step.

Test from the client
nc -vz -w 5 203.0.113.20 3458
ssh -vvv -p 3458 [email protected]
Inspect sshd and ports
ss -lntp | grep sshd
sshd -T | grep -E '^(port|listenaddress|passwordauthentication|pubkeyauthentication)'
systemctl status sshd --no-pager -l
Validate and restart safely
/usr/sbin/sshd -t && /usr/local/cpanel/scripts/restartsrv_sshd
journalctl -u sshd --since '-30 minutes' --no-pager | tail -n 100
Check firewall and bans
csf -g 3458
csf -g 203.0.113.10
fail2ban-client status 2>/dev/null || true
whmapi1 --output=jsonpretty cphulk_status
Risk of administrative lockout

A wrong firewall, SSH or login-protection rule can make the server unreachable. Do not close management ports without KVM, VNC or provider console access.

05
FREQUENTLY ASKED QUESTIONS

Critical decision points

Does a timeout mean the password is wrong?

No. A timeout usually occurs before the SSH authentication phase, at the TCP, routing or firewall layer.

Does changing the SSH port provide complete security?

It can reduce automated noise, but it does not replace strong key authentication, firewall restriction, root policy and updates.

What is the most important step before restarting sshd?

Run sshd -t and keep the current session open until a second connection succeeds.

Does cPHulk block SSH public-key login?

cPanel documentation states that cPHulk does not affect public-key authentication.

07
RELATED GUIDES

Continue with the correct next step

EKA SERVER TECHNICAL KNOWLEDGE CENTER

Preserve access first, then harden security.

The correct security method is not to disable protection, but to measure the network, service and rule path and apply the narrowest safe change.

Technical support
Top