0

I set up a ssh server through ssh-host-config. Then I started the server.

net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.

When I try to connect I get:

ssh myusername@localhost
ssh: connect to host localhost port 22: Connection refused

I tried to allow port 22 in Windows Firewall, but that didn't change anything. And because I'm trying to ssh locally I don't think Windows Firewall is the culprit.

I'm using Windows 7 and

What should I look for to fix this problem?

Steven Wexler
  • 101
  • 1
  • 1
  • 2

2 Answers2

1

From the netstat output (which you might want to move into your question), the SSHD daemon is not listening on port 22. Which probably means although it started, it then crashed or stopped.

Try running sshd -d -d

That will run sshd in the foreground with debugging turned on, and you can see if / why it's crashing.

EightBitTony
  • 9,211
  • 1
  • 32
  • 46
0

It is clear from the netstat output that either sshd is not listening on port 22 or the service is not running (crash on start). Best place to look for in windows would be event viewer in control panel. Also in the services.msc, see if it logging. If it is logging , logs would tell you what is happening and hence you would find the fix. Open resource monitor and see if the process sshd is running.

bagavadhar
  • 538
  • 4
  • 14