[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't connect to workstation using ssh from a remote machine



On 2021-01-14 07:55, Greg Wooledge wrote:
On Wed, Jan 13, 2021 at 08:20:30PM -0500, Dan Ritter wrote:
Gary Dale wrote:
$ telnet workstation  22
Trying 192.168.1.20...
telnet: Unable to connect to remote host: Connection timed out
Options:
. workstation is not running sshd
No.  That would give you "connection refused" immediately, not a timeout.

. workstation is not running sshd on port 22
Same.

. workstation's DNS is wrong/ that's not the right IP
. firewall or other packet filtering on one or the other or in
   between
Those two are possible.

In the *general* case (not here, because there's additional information
here), you also have:

  * Machine is powered off/crashed.
  * Machine's network cable is unplugged or loose.
  * A router is down/malfunctioning between you and the machine.
  * Machine's networking is mis-configured.

These are ruled out in this particular case because the OP is typing
other commands on the target machine, including commands that invoke
network connections in the opposite direction.

IMHO the most likely scenario here is "firewall".

The strongest indicator of a firewall being the cause of the problem is
that you can ping a given IP address (or telnet to port X on that
IP address), but you cannot telnet to port Y on that same IP address.

If the telnet failure is a timeout rather than a connection refused,
while other network connections to the same IP work, then it's 100%
a firewall issue.  Everything else (crashed service, etc.) would give
you a connction refused.


You are right. Somehow I found that ufw is running on my workstation. I don't remember adding it but it was blocking all access except for some ports in the 1700 range. Allowing ssh seems to have fixed the problem.


Reply to: