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.

  • 2
    That sounds more like a question for a Windows forum - have you checked your Windows firewall settings? Jul 10, 2016 at 0:19
  • Is computer B's firewall configured to allow incoming packets on port 22? Jul 10, 2016 at 0:20
  • 2
    Check the port 22 to be open on computerB from computerA with 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.
    – bistoco
    Jul 10, 2016 at 0:21

1 Answer 1


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.

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.