Why are all my SSH attempts failing due to timeout?
That error message means the server to which you are connecting does not reply to SSH connection attempts on port 22. There are three possible reasons for that:
- You're not running an SSH server on the machine. You'll need to install it to be able to ssh to it.
- You are running an SSH server on that machine, but on a nonstandard port. You need to figure out on which port it is running; say it's on port 2222, you then run
ssh -p 2222 hostname
. - You are running an SSH server on that machine, and it does use the port on which you are trying to connect, but the machine has a firewall that does not allow you to connect to it. You'll need to figure out how to change the firewall, or maybe you need to ssh from a different host to be allowed in.
EDIT: as (correctly) pointed out in the comments, the third is certainly the case; the other two would result in the server sending a TCP "reset" package back upon the client's connection attempt, resulting in a "connection refused" error message, rather than the timeout you're getting. The other two might also be the case, but you need to fix the third first before you can move on.
Check by telnet command whether you're able to connect to SSH port 22. If you are not able to connect then check for it. First you should be able to connect on port no. 22 to server.
By default SSH port is 22. But if you have configured any other port then use that port instead of 22.
telnet < ip/url of server> < port>
e.g. telnet domain.com 22