SSH errors are quite frustrating, especially when you are in a hurry for last minute server changes.
One such problem is SSH timeout errors on your Vultr instance.
What does this timeout error means? Is it a problem on the server side or my side? Well, the problem can be on both sides.
At Bobcares, we help server owners resolve such errors as part of our Managed Cloud Services.
Today, we’ll discuss the top 4 reasons for this error and how we fix them.
Vultr SSH timeout error – Let’s get a brief idea
Simply put, a connection timeout error means that the server is taking too long to respond to a data request made by another device. In other words, the server request isn’t completed in the pre defined time period.
Similarly, SSH timeout error means that the SSH clients such as PuTTY tried to connect to the SSH server, but the server failed to respond within the time period. And, users see an error like below.
ssh: connect to host xx.xx.xx.xx port 22: Connection timed out
Firstly, our Support Engineers access the Vultr instance from the console. We access the Vultr console from Servers > Click on the Vultr instance hostname > Click on View Console(small computer monitor).
Further, we check the server logs and SSH logs(/var/log/messages and /var/log/secure) to find out the origin of this error.
Vultr SSH timeout error – Why & How to fix it?
Now, let’s see the main reasons for this error and how our Support Engineers rule out each possibility to fix this problem.
1) Wrong SSH host/IP address
Server owners commonly face SSH timeout errors on their Vultr instances when they give wrong SSH hostname or outdated IP address when connecting to the server. In addition to that, this error can occur if multiple Vutr instances use the same IP address.
How we fix?
Firstly, our Support Engineers ensure that the customer uses the correct SSH connection details. In other words, we confirm that there are no typo mistakes in the hostname, and also the IP address used is correct. Moreover, we use nmap command to identify the Vultr instances running on the network. And, if we find any IP conflicts, we just change the IP address of the Vultr instance after confirming with the customer.
2) Wrong SSH port
Common SSH port (22) is always vulnerable to attacks. That’s why, server owners change the SSH port to a custom one. So, if Vultr server owners use the wrong port to access the instance, they’ll receive SSH timeout errors.
How we fix?
Our Support Experts login to the Vultr instance from the console and verify the custom SSH port of the server. The SSH configuration file will be located at /etc/ssh/sshd_config. Further, we check the Port parameter in the configuration file to identify the custom port used in the server.
Alternatively, we use netstat command on the Vultr instance to identify the SSH port on the server. And, if we find that the customer uses wrong port, we update the correct port to the customer.
3) Firewall restrictions
Similarly, SSH timeout errors can occur due to improper firewall configurations. Some public networks block port 22 or custom SSH ports. Sometimes, the server firewall is configured to DROP all the connections by default and the SSH port is not allowed to accept connections. Similarly, the firewall software can block specific IP addresses or IP ranges to the server.
So, if the ports or IP address aren’t allowed to connect in the firewall, the connectivity can fail and users see SSH timeout errors.
How we fix?
In such cases, our Support Experts test other hosts using the same SSH port with a known working SSH server. In this way, we can identify if the problem is specific to the particular Vultr instance.
Similarly, we check the connectivity to the SSH port from an external network using the telnet command.
telnet xx.xx.xx.xx 22
If we find any firewall rules that deny connection to the SSH port, we’ll remove the rule from the firewall configuration. Further, we edit the firewall configuration to allow connections to the SSH port. For instance, we use the below iptables rule to allow connections to SSH port 22 on CentOS servers.
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
[Messed up firewall rules on your Vultr Cloud Compute? Our Support Experts can help you here.]
4) Network issues
Likewise, network issues at the upstream providers and network problems within the server may also cause SSH timeout errors. This commonly occurs after server reboot or maintenance. We’ve seen instances where the Vultr instance fails to bring up the network interface after reboot. This creates further problems including SSH connectivity.
How we fix?
In such cases, our Support Experts access the server from Vultr console. After that, we check the network configuration file for any errors and correct them. We mainly ensure the network parameters like the IP address, netmask, gateway, etc. of the Vultr VPS are correct.
Alternatively, in some cases we need to restart the network service on the server to fix the issue. For example, we restart the network service using the below command on CentOS 7 servers.
systemctl restart network.service
[Need to regain access to your Vultr VPS? Click here and get one of our Server Experts to fix it for you.]
Conclusion
In short, SSH timeout errors on a Vultr instance can occur due to server firewall restrictions, network issues, and more. Today, we’ve discussed the top 4 reasons for this error and how our Support Engineers fix them.
Last night, I signed up and made an Ubuntu instance. I’ been suffering from this issue since then. Please kindly check my instance in order to pin down the root cause.
Thank you.
Hi there,
Do you still get SSH timeout error? Our Support Administrators will be able to help you. To contact our support team, please initiate a chat from the icon at right-bottom.