Portal Home > Knowledgebase > Connection Problems > How to restore my SSH access?

How to restore my SSH access?

If you are getting timeouts trying to connect to your VPS using SSH but your VPS IP is pinging fine, then you are most likely blocked by a firewall software you have installed on your VPS.

If you've recently installed a firewall on your VPS and suddenly lost connectivity or after a reboot, you need to configure your firewall to allow SSH access.  We have a list of commands here that can be used to restore SSH access after installing a firewall: Commands to allow SSH access in common firewalls

1. To check if your VPS IP is pinging fine:


Open CMD, and type ping <yourVPSIP> and press Enter.


Open a terminal emulator and type ping <yourVPSIP> and press Enter

VPSDime Checker:

Go to Submit Ticket page: https://vpsdime.com/submitticket.php and click "My VPS Is Down" and choose your VPS there.

This tool will do some automated checks and will let you know if your VPS IP is pinging or not.

Third Party:

If you want to confirm your VPS is accessible from different places in the world, please go to http://ping.pe/ and enter your VPS IP there and run the test.

If you see the latency in ms values there, then ping is working fine and your VPS is actually online.

2. Connect to your VPS using Console:

Once you confirm that your VPS IP is pinging, then go to https://vpsdime.com/clientarea.php?action=products and click Details button next to the VPS.

On that page, you will see a button called Console.

This utility will allow you to login to your VPS in command line when you can't access it using SSH.

Then you can simply check what's wrong with it there using command line.

3. Stop Firewalls

To Stop CSF: csf -x

To Stop UFW: service ufw stop

To Stop firewalld: service firewalld stop

To Stop iptables and flush rules:
service iptables stop
iptables -F
iptables -P INPUT ACCEPT

If you are not sure which firewall you have installed on your VPS, then simply issue all the commands above until you restore access.

4. SSHD might not be running:

If you still cannot connect to your SSH after stopping the firewalls, then your SSHD might not be running.

To check if it's running run:

For CentOS: service ssh status

For Debian/Ubuntu: service sshd status

If it shows as stopped, simply try to start it by running:

For CentOS: service ssh start

For Debian/Ubuntu: service sshd start

And then check the status of it again.

If it started fine, then you'll see "running" on the output.

If you still see "stopped" on the output, then there might be a config typo on your sshd_config file.

To confirm this, check your SSHD logs in /var/log/ directory.

Then /etc/ssh/sshd_config file using nano or vi and locate the misconfiguration and fix it. Save it and try to start your SSHD again.

5. Asking for help

If you follow all the steps above and you still can't access to your VPS using SSH, then please submit a support ticket using "My VPS is Down" option in https://vpsdime.com/submitticket.php page and we'll check it for you.

Add to Favourites  Add to Favourites    Print this Article  Print this Article

Was this answer helpful?