If you find yourself encountering errors on SSH, this article will help you solve them easily. Before we start it’s worth noting that in order for SSH to work SSH Access needs to be enabled.

For quick access you can choose error from this list:

Connection closed

If you are seeing this message right after trying to connect via SSH:

This is usually caused by SSH Access being disabled. All you need to do is enable it and reconnect.

The terminal closes right away

If your terminal closes right away after you insert your password, all you have to do is Disable and then Enable SSH Access - the next connection should be successful.

Permission denied or Access denied

If you are seeing a similar message:

It means that you are using incorrect SSH credentials. This can be fixed easily by double-checking your SSH details and changing your SSH password. It’s worth noting that you need to change the password for the main domain (domain name which you see in your Billing with your hosting account), otherwise, the SSH connection might not work properly.

NOTE:

  • We recommend setting up SSH keys for your hosting account, so an SSH password won’t be needed

Connection refused

This error is usually caused by using the wrong port. The default port for SSH is 22, although here at Hostinger we have it on 65002 port for security reasons. As a result, you need to use this port specifically when connecting.

Connection timed out

This error might be displayed as ssh: connect to host 185.185.185.185 port 65002: Connection timed out on terminal or Network error: Connection timed out on PuTTY. The main reasons for this error are:

  • Your ISP (Internet Service Provider) is blocking incoming or outgoing traffic/TCP connections on port 65002. Contact your ISP to clarify

  • Your router/hotspot is blocking incoming or outgoing traffic/TCP connections on port 65002. Double-check your network hardware settings, restart your router

  • You have a local firewall or antivirus that is blocking incoming or outgoing traffic/TCP connections on port 65002. Double-check your firewall settings and turn off your antivirus temporarily

  • Something malfunctioned in your TCP/IP software on your system and your internet might be down. Check if you still have an internet connection

  • Your hosting server’s IP is null routed due to a DDoS attack or maintenance

Elevated permissions commands

Any elevated permission commands (for example sudo) is disabled on our Shared and Cloud hosting due to security reasons. In case you want to have full freedom and use commands like sudo - we highly recommend VPS hosting. Keep in mind that VPS hosting is self-managed, and everything needs to be configured on your part.

Terminated or unfinished command or Killed processes

If you see that some command started running correctly, but for some reason, it stops - be sure to check your Order Usage. Each action on SSH uses your plan’s resources and if there are not enough of them, the process will fail. To solve this, consider an alternative method to what you want to achieve or upgrade your hosting plan.

Did this answer your question?