All Collections
Files management
SSH connection and SSH keys
How to solve the most common errors in SSH?
How to solve the most common errors in SSH?
Solving errors in SSH terminal
Updated over a week ago

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 the error from this list:

Connection closed

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

This is usually caused by a disabled SSH access. All you need to do is enable SSH Access 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 re-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. When you first set up your hosting account, the SSH password has the same value as the FTP password of your main domain (the domain name which you see in your Billing with your hosting account)

If you are not sure about the exact value, you can set a new password for both FTP and SSH by changing the FTP password of the main domain, or create an SSH-only password

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.

You can check more possible causes and their solutions in this video:

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?