Please, could you try to describe better your setup? For example: is the server directly connected to the Internet? Is there a router? Is there a firewall? Thanks!
–
Andrea CorbelliniJan 10 '13 at 17:47

1

Try: sudo netstat -tlpn first. You should see something running on port 22, and it should be an ssh server. Update with the results.
–
CoryJan 10 '13 at 17:53

1 Answer
1

It sounds like a firewall issue to me. Is this machine behind a physical firewall on a different network or on the same LAN? If it is on a different network, check both the gateway firewall and the host firewall (iptables) and make sure that port 22 is allowed.

This will take care of the host-based firewall, but if there is a network-based firewall between you and the machine you are trying to remote into then you will have to consult that specific device's instructions for allowing connections to port 22 into the network.

If the remote server is behind a hardware firewall, you'll need to change the firewall there accordingly as well. Same applies if you're behind a router, or other corporate network with IP/packet/firewall filtering.
–
Thomas W.Jan 28 '13 at 21:30

Yeah thats what I pointed out in the last paragraph of my answer.
–
KentgravJan 28 '13 at 21:42

1

I only posted the note because some users don't read the entire text of answers, and wanted to make sure that point stood out.
–
Thomas W.Jan 28 '13 at 21:45

3

What? /etc/sysconfig? /etc/init.d/iptables? Are you talking about RedHat/Fedora? There's no such a thing on Ubuntu/Debian!
–
Eric CarvalhoJan 28 '13 at 21:47

Yeah thanks for pointing that out Eric. I've yet to completely understand all the differences in a Debian based Linux distro. The locations/naming conventions may be different, I work in an government/enterprise environment on mainly CentOS and RedHat so forgive me for any confusion. The basic concept is till the same.
–
KentgravJan 29 '13 at 16:17