Complete Guide to Fixing the SSH: Could Not Resolve Hostname: No Such Host Is Known

Complete Guide to Fixing the SSH: Could Not Resolve Hostname: No Such Host Is Known

As an admin, you will always find yourself working with SSH. In some cases, you’re going to inevitably come across errors. And one such error is the “So Such Host is Known” error. As and when you get such error, it implies that either the server is down or the hostname is incorrect and hence SSH wasn’t able to connect to it.

In this article, what causes the error and how to fix it.

What Causes the SSH: Could Not Resolve Hostname Error?

In this section, learn about the reasons behind the error. In most cases, it’d be the lack of connectivity. So first thing you should ensure is functioning, fast internet connection.

The next reason is users use the SSH in the wrong way. So they get this error because the SSH program doesn’t know what to do about it.

How to Fix the Error?

Now that you know what causes the error, it’s time to move forward and fix the error.

If it’s a network connectivity issue, then you should be able to resolve it on your own. Once the network is back on, try using the SSH and it should work just fine.

The next thing you need to check if you’re using SSH the incorrect way. Most users who see the error SSH using the following command:

Instead, you should SSH using the command mentioned below which is the correct way of doing it:

ssh -p 22 user@IP ADDRESS
Now you should get into the server using SSH.

Another situation is when your /etc/hosts file are not configured properly. So you should dig deep and fix the errors.

In conclusion, the problem isn’t a serious one. Just work with your connectivity or configuration and you should be able to fix the error without further problems.
First release
Last update
0.00 star(s) 0 ratings

More resources from kumkumsharma