0

I used ssh to connect to my university's PC a couple of times. I can't do this anymore, it says port 22 timed out. The thing is I also tried other computers connected to the same network of the house, and the same happened.

But when I tried to connect with my phone with 3g internet, via a terminal application, the connection was successful.

So it's specifically the house's internet problem.

How can I proceed to resolve this issue?

  • It's possible that something between your PC and the server is blocking port 22 or even your entire subnet. Unfortunately that is going to be difficult to toubleshoot via a forum like this. For starters you may want to run traceroute to see how far the packets get: sudo traceroute -T -p 22 <server_ip> – kaylum Mar 1 at 21:40
  • Do you have a NAT, in your home router? (see my answer) Knowing this will help us create a better answer. – ctrl-alt-delor Mar 1 at 22:06
0

Your home router, will probably have a Network Address Translator (see there are no more IP addresses left, and what we are doing about it).

The NAT may be blocking it. Or else it could be a firewall at the ISP. There are various types of NAT, some types are better than others.

To see if you have a NAT: search for what's my IP and make a note, then type ip addr, and see if any of your addresses match. If they do then there is no NAT. And you will have to look elsewhere for the problem.

However even if you have a NAT, it may not cause this problem. Depends on the NAT type.

| improve this answer | |
  • Thanks for answering. No when I type ip addr I don't see my IP. So I guess I don't have a NAT.. It's weird because the last days I could connect. The only difference is that yesterday night I connected from a windows pc using "cygwin" (a linux terminal for windows). – paulaxa1 Mar 1 at 22:10
  • I said "if they match" that is your IP address from what's my IP, can be found in the output of ip addr. Then you don't have a NAT. Also you should see an IP, just not the one from what's my IP. – ctrl-alt-delor Mar 1 at 22:17
  • And cygwin is not a Linux terminal. cygwin is Gnu+Linux - Linux. So well Gnu. Linux (the kernel) or any other Unix kernel, is replaced by cygwin.dll, it simulates a Unix kernel. – ctrl-alt-delor Mar 1 at 22:19
  • Really, the machine doing NAT is acting as a firewall, and could be blocking traffic. Or the target could be hidden behind NAT. And there are the local firewalls (origin and destination), and SSH configurations allowing certain connections. There are several levels involved here. – vonbrand Mar 3 at 3:34
  • @ctrl-alt-delor CygWin is a set of libraries thst allow to build and run (almost) unmodified Unix sources on Windows. It offers a lot of basic (and not-so-basic) Unix tools (most of them the GNU versions) packaged as binaries for easy install. – vonbrand Mar 3 at 3:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.