Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

SSH timeout server not responding – How to fix and avoid it?

by | Sep 20, 2019

SSH timeout server not responding is a frustrating error message for users.

And, when it happens while making important server changes, things go for a real toss !

Usually, the SSH connection timeout occurs due to bad server settings, wrong IP hosts, firewall restrictions, etc.

At Bobcares we often get requests to fix ssh timeout error, as a part of our Server Management Services.

Today, let’s discuss the ssh timeout error and see how our Support Engineers fix it.

 

What is SSH timeout in a server?

SSH is a secure way to login to a remote machine over an insecure network. For instance, network services like login, remote command execution, etc. can be securely executed via SSH.

Usually, the session timeout is an event that indicates an inactive user. This event changes the status of an inactive user session to invalid. And the SSH user will get the message ‘ssh timeout server not responding’.

The typical error message appears as.

ssh: connect to host xx.xx.xx.xx port 22: Connection timed out

Here xx.xx.xx.xx denotes the host IP that the user is trying to connect.

For users making important server changes, this timeout can be annoying.

A few reasons for this timeout error include incorrect host IP, firewall setting, port block, etc.

 

Causes and fixes for an SSH timeout error

So far, we saw the error in detail. Now let’s see the causes for the error and discuss how our Support Team fixes it for our customers.

 

1. Wrong hosts

Usually, SSH timeout errors show up when users give the wrong SSH hostname or outdated IP address.

Therefore, our Support Team begins checking by verifying the SSH connection details. We ensure that the users use correct host IP addresses, user details without any typo errors.

 

2. Change in SSH port

Some customers may change the default SSH port 22 to some custom port in their server. Then, when the customer tries to connect, the ssh timeout error shows up.

To check the SSH port we use the command,

netstat -l | grep ssh

Thus, our Support Team will be able to find the port at which SSH runs. Further, we check the SSH configuration file at  /etc/ssh/sshd_config and verify the port parameters.

 

3. Firewall restrictions

Many times, firewall settings can cause timeout errors while trying to connect using SSH. This can be due to some server-side settings or port blocks in some networks.

So, our Support Engineers check the firewall settings and make sure that it does not cause the ssh connection timeout.

For instance, we check the iptables to see if there are any IP restrictions.

iptables -nL | grep xx.xx.xx.xx

We remove the IP restrictions to fix the error.

 

How we can avoid ssh timeout?

So far, we saw how we fix the ssh timeout error. As part of our proactive server administration, our Server Administrators avoid ssh connection timeout by changing a few configuration settings. Let’s take a look at them now.

 

1. Client-side settings

Firstly, let’s see how our Support Engineers change the session timeout on the client-side.

To avoid session timeout for a user, we edit the ~/.ssh/config file.

So, in this configuration file, we add the following code.

Host *
ServerAliveInterval 120
ServerAliveCountMax 2

This indicates that a null packet is sent to the server every 120 seconds twice to keep the session alive.

 

2. Sever-side settings

Similarly, server-side settings also affect all client connections.

Hence, to make such a change, we edit the configuration file. In the /etc/ssh/sshd_config file we add the following.

KeepAlive yes
ClientAliveInterval 120
ClientAliveCountMax 2

These settings make the server send a null packet every 120 seconds. It shows a timeout after trying for two times.

 

[Still having trouble in fixing SSH timeout error? – We will help you.]

 

Conclusion

In short, ssh timeout server not responding error occur due to bad server settings, wrong host address, firewall settings and so on. Today, we discussed the fixes and saw how our Support Team proactively avoid timeout errors.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF