SSH error: “Connect to host: Bad file number”

5,759

There are multiple possible causes. Perhaps the most likely is that the computer with the SSH server may have a firewall. Troubleshooting that would need more details (at very minimum, what operating system).

You may wish to verify that the traffic even reaches the computer. If your router is a system that you can SSH (or Telnet) into, try using tcpdump. If you have a web interface, see if there are diagnostics. To really clarify things, you could set up a transparent proxy to view traffic, although that may be more work.

Share:
5,759

Related videos on Youtube

Kookerus
Author by

Kookerus

I'm just a 17 year old trans-girl going to college for programming. I mainly use C++, but I'm learning a bit of Rust.

Updated on September 18, 2022

Comments

  • Kookerus
    Kookerus over 1 year

    When on my local network, I can SSH into my desktop just fine by connecting to 192.168.0.5. However, When attempting to connect to my home IP, using the same port and user, I get the infamous "Bad file number" error, even though I've set up port forwarding correctly. Am I doing something wrong?