If you change your sshd port to a custom port other than default 22, you probably receive this error.
This error means your client machine cannot connect to the destination using that port.
The reason is because of the remote machine's firewall. It currently doesn't allow your custom port to go through.
Knowing that, the solution is as simple as this:
$ iptables -I INPUT -p tcp --dport [YOUR-CUSTOM-PORT] -j ACCEPT # Save iptables rules permanently, for the sake of another reboot $ service iptables save
Of course you must find the way to connect to your machine when such incident happens. For me, since the machine is fresh, I simply reinstalled the OS.