public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Russell VT <russellvt@gmail.com>
To: Mark Geisert <mark@maxrnd.com>
Cc: cygwin@cygwin.com
Subject: Re: sshd
Date: Sat, 12 Feb 2022 22:30:55 -0800	[thread overview]
Message-ID: <CANV2+nXOw49RQBZOkEV_cDMQJHL-ut3t+8sko_8mggwEuK8oLQ@mail.gmail.com> (raw)
In-Reply-To: <a267fb96-4f61-65d0-846a-9f55acd59ecb@maxrnd.com>

Note that port 5972 isn't *really* what you want, as that's arbitrary...
but port 22.

Check the Windows firewall, as was already suggested (highly suspect, if
you just timeout when trying to connect).

If you try rebuilding what you did under Windows, you're likely going to
want to look at *cygserver* and *cygrunsrv*, and NOT directly at sshd. It's
in /usr/sbin, generally.

Something like:

$ cygrunsrv --list
cygsshd

$ cygrunsrv --query cygsshd
Service             : cygsshd
Display name        : CYGWIN cygsshd
Current State       : Stopped
Command             : /usr/sbin/sshd -D


You might also look to the Windows System Utilities / Sysinternals
<https://docs.microsoft.com/en-us/sysinternals/> (optional download), and
the "Process Explorer" for more detailed Windows information at the tips of
your fingers. They update every month or two, and are worth keeping
"reasonably up to date." There's a plethora of Windows troubleshooting
tools, and some fun stuff as-well.

Cheers -
Russell







On Sat, Feb 12, 2022 at 9:30 PM Mark Geisert <mark@maxrnd.com> wrote:

> Ernie Rael wrote:
> > Hi all,
> >
> > I set up cygwin several years ago and have only had one system at home.
> I've
> > recently got a 2nd, linux.
> >
> > I've used ssh locally under cygwin, primarily to get a term for a use
> with admin
> > priv. And I can ssh from cygwin to the linux machine. On cygwin I see
> >
> >     $ ps -ef |grep sshd
> >     cyg_serv     255     254 ?          Feb  1 /usr/sbin/sshd
> >
> > But ssh from linux to cygwin hangs (finally times out). Ping works linux
> --> windows.
> >
> > I must have run ssh-host-config way back when. Can I just run it again?
> >
> > Suggestions for something else to try and/or triage the problem?
>
> You might try the following.  Determine the Windows pid of your sshd
> process, then
> use netstat to see if that process is listening on the sshd port.  Here's
> what a
> successful check looks like:
>
> ~ ps -as|grep sshd
>    42834 ?          Jan 16 /usr/sbin/sshd
>
> ~ ps -lp 42834
>        PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
>      42834   42832   42834       5972  ?         197612   Jan 16
> /usr/sbin/sshd
>
> ~ netstat -ao|grep 5972
>    TCP    0.0.0.0:22             zotac:0                LISTENING
>  5972
>    TCP    [::]:22                zotac:0                LISTENING
>  5972
>
> If the two output lines aren't there, I'd suspect a Windows firewall has
> TCP port
> 22 walled off.  ("zotac" is my machine name; you'll see something
> different there.)
> HTH,
>
> ..mark
>
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>


-- 
Russell M. Van Tassell <russellvt@gmail.com>

  reply	other threads:[~2022-02-13  6:31 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-13  2:25 sshd Ernie Rael
2022-02-13  5:29 ` sshd Mark Geisert
2022-02-13  6:30   ` Russell VT [this message]
2022-02-13 12:42     ` sshd Ernie Rael
2022-02-13 12:38   ` sshd Ernie Rael
2022-02-13 19:59     ` sshd Erik Soderquist
2022-02-14  6:56     ` sshd Andrey Repin
2022-02-14  7:42       ` sshd Ernie Rael
2022-02-15 17:20         ` sshd Gajanana Shridhar
  -- strict thread matches above, loose matches on Subject: below --
2010-05-13 20:08 sshd Steven Collins
2010-05-13 20:12 ` sshd Eric Berge
2010-05-13 20:18   ` sshd Steven Collins
2010-05-13 20:32     ` sshd Eric Berge
2010-05-13 20:38       ` sshd Steven Collins
2010-05-13 20:17 ` sshd Andrew Dunstan
2010-05-13 20:31   ` sshd Steven Collins
2006-04-20 18:49 sshd Steve Kelem
2006-04-20 19:22 ` sshd René Berber
2003-10-15 14:52 sshd e-bone
2003-10-15 15:32 ` sshd Larry Hall
2002-12-18 13:25 sshd Harig, Mark A.
2002-12-18 10:19 sshd Vince Hoffman
2002-12-18  9:21 sshd Vince Hoffman
2002-12-18  9:03 sshd Vince Hoffman
2002-12-18  8:00 sshd Stuardo Rodriguez
2002-07-02 19:53 sshd Bryan Zimmer
2002-07-03  1:39 ` sshd Corinna Vinschen
2002-07-03  8:01   ` sshd Bryan Zimmer
2002-07-03  8:53     ` sshd Corinna Vinschen
2002-03-02 13:23 sshd Erik Vigmostad
2002-03-04  8:37 ` sshd Larry Hall (RFK Partners, Inc)
2001-05-31  0:46 sshd Warunee Noiarun
2001-05-31  3:03 ` sshd Corinna Vinschen
2001-03-16 15:07 sshd Bret Jordan
1999-04-13 12:10 SSHD Gerhardstein, Lawrence H
1999-04-30 18:32 ` SSHD Gerhardstein, Lawrence H
     [not found] <862566DC.00528EDA.00@marker.its.uiowa.edu>
1998-12-16 16:28 ` SSHD JJ Streicher-Bremer
1998-10-13 12:17 sshd Juha Jäykkä
1998-01-07 14:50 sshd Derek Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANV2+nXOw49RQBZOkEV_cDMQJHL-ut3t+8sko_8mggwEuK8oLQ@mail.gmail.com \
    --to=russellvt@gmail.com \
    --cc=cygwin@cygwin.com \
    --cc=mark@maxrnd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).