By Paul Tero CHAPTER 8
You can sort of tell if there’s a firewall in your way depending on
how the connection fails. To test if SSH is being blocked, you can run the
command ssh or use telnet as above to port 22:
$ telnet http://www.smashingmagazine.com 22
Trying 80.72.139.101...
telnet: Unable to connect to remote host: Connection refused
“Connection refused” means that your data reached the server but was
probably refused entry for non-firewall reasons. For example, SSH may
be turned off or running on a different port. The message “Connection
timed out” or no
message more
strongly indicates a
firewall block. If it
does connect, press
Control + ] to get to
the telnet> prompt
and then type quit to
quit.
So if you have a
firewall (that email
should tell you), you
need to make sure
that SSH is allowed
and that your public IP address is in the list of trusted ones. Even if you
know your IP address was in the list yesterday, it may have changed
today, particularly if you have had broadband issues recently. The public
IP addresses assigned to home routers can stay the same for months on
end, and then suddenly change. How and why and when depends on your
broadband company and your neighbors. The only way to avoid this is to
pay extra for a static or fixed IP address.
Many firewalls maintain a list of trusted IP addresses.