This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: trouble getting sshd to allow me to ssh in to winxp cygwin computer


Thanks for your excellent feedback, Brian. I will do as you say. Indeed,
netstat does NOT show anyone listening on port 22.

I'll follow you suggestion to remove previous services and do the right
thing.
 
Thanks again,

Michael

-----Original Message-----
From: Brian Dessent [mailto:brian@dessent.net] 
Sent: Sunday, July 10, 2005 11:39 PM
To: cygwin@cygwin.com
Subject: Re: trouble getting sshd to allow me to ssh in to winxp cygwin
computer

Michael Shiloh wrote:

> Long time cygwin user, but first time trying to get sshd on a windows
machine.

Welcome.

> I've followed the instructions at
http://pigtail.net/LRP/printsrv/cygwin-sshd.html, and all seems fine
until I test it:

Just a heads up: Mentioning other people's sshd directions on this list
is a good way to get a cold shoulder.  For years there have been various
sites that purport to tell the user how to install sshd under Cygwin,
and their instructions are one or more of: out of date, misleading,
unneccessary, incorrect.

To install the ssh daemon under Cygwin you type 'ssh-host-config' and
answer the prompts.  Don't use any other procedure.  Note that if you've
already installed a service this will not work, because that script will
not override what you've already done.  Remove the service first if
desired.  You should also review /usr/share/doc/Cygwin/*openssh* which
is the Cygwin-specific information about ssh.  Do not do whatever it is
these other sites tell you.

> ~% ssh    $USERNAME@127.0.0.1
> ssh: connect to host 127.0.0.1 port 22: Connection refused
> 
> I'm pretty sure sshd is running, because if I try to start it I get:
> 
> ~% net start sshd
> The requested service has already been started.
> 
> My firewall is turned off.
> 
> I am on a VPN, if that makes any difference.

It's very likely that the VPN is the problem.  There have been examples
of it on this list in the past.  What you need to do is first verify
that sshd is running and listening on port 22.  "netstat -an|grep :22"
should include a line such as:

  TCP    0.0.0.0:22             0.0.0.0:0              LISTENING

(You can add -o to netstat to get it to report the PID and you can
verify that it's sshd listening, if you want.)

If you verify that the sshd process is indeed listening on 0.0.0.0 port
22 (which means 'any interface') then you know sshd is set up properly,
and the fault lies somewhere else.  I would strongly suggest disabling
the VPN to see if it makes a difference.  A lot of these programs impose
extreme restrictions on the networking of the host computer, usually as
a means of security.  (CIO types sleep better at night knowing for
example that when the chosen VPN software is active, all traffic is
routed through that interface even if it is destined to a different one,
for example.  It would not surprise me in the least if this extended to
the act of blocking incoming connection requests on certain/all ports.)

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]