I'm receiving the same error message when trying to connect Computer A, which is running Ubuntu, to Computer B, which is running Windows 10 with Cygwin and OpenSSH installed. When using the command ssh user@<IPaddress>
on Computer A, it takes about 2 minutes before it returns the message 'ssh: connection to host port 22: connection timed out'. I have been able to ssh from Computer B to Computer A successfully.
1 Answer
This problem may occur when: 1. Port 22 is closed. 2. Ssh is not installed on the machine.
Check whether ssh service is running or not on the machine to which you want to connect.
nmap -PN -p 22 ipComputerB
. I guess your ssh service is not running, or if it's running, it may be blocked by windows defender (or another firewall). Also notice that 22 is the default ssh port, your cygwin may be using another port.