delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/23/14:48:52

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <174384.61589.qm@web38207.mail.mud.yahoo.com>
References: <4B0894B3 DOT 1020300 AT gmail DOT com> <f4d6f44b0911211929r35d1f1e1y9bbdf80c03f95f9e AT mail DOT gmail DOT com> <4B08B377 DOT 5000003 AT gmail DOT com> <20091122002436 DOT 461778cd AT travel> <4B08D0B7 DOT 6060403 AT gmail DOT com> <20091122010058 DOT 70fd4328 AT travel> <4B08DA2F DOT 8050401 AT gmail DOT com>
Date: Mon, 23 Nov 2009 11:48:39 -0800 (PST)
From: Alex Quinn <alexanderjquinn AT yahoo DOT com>
Subject: Re: Cannot run SSH
To: Cygwin list <cygwin AT cygwin DOT com>
In-Reply-To: <4B08DA2F.8050401@gmail.com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

FWIW, I had the exact same problem.  This was under Cygwin 1.5 (not 1.7) and Win7 (build 7600 enterprise release).  The OpenSSH server worked for a few days and then stopped working with similar symptoms to you.  I eventually got it working again.  After working for a couple more days, it broke again.  Nevertheless, this is what I did to make it work after not working.  I realize some of this may be unnecessary or even counterproductive.  I don't know enough Cygwin and/or Windows to say what made a difference so I'm just telling you what I did in the off chance that it helps somebody find the real problem.

1. Stop and delete the service:
        cygrunsrv --stop sshd
        cygrunsrv --remove sshd
2. Remove the cyg_server user via Windows.
3. Restart system.
4. From bash, run ssh-host-config to recreate user and sshd service.  Answer yes to everything except allow cyg_server to be the name of the user.
5. Manually set the password for the cyg_server user from Cygwin.  Make it 10 characters with only alphanumeric (i.e. "abcDEF1234" - not my password obviously).
        passwd cygserver
6. Go into Services, properties of the sshd service, Log On tab.  Manually set that to the stored log on password for the service.
7. Close bash if it's still open.
8. Start-->Run-->"ash" and run the rebaseall command.
9. From the command prompt, run net start sshd.

Please forgive the superfluous details.  Good luck!

Alex






----- Original Message ----
From: baykusderki <baykusderki AT gmail DOT com>
To: cygwin AT cygwin DOT com
Sent: Sun, November 22, 2009 1:29:03 AM
Subject: Re: Cannot run SSH

On 11/22/2009 12:00 AM, Ken Jackson wrote:
> 
> Is SYSTEM in /etc/passwd?  If not, I think that's a problem.  Even if
> it's there, maybe it's wrong.  I would try the mkpasswd command to
> recreate your passwd file (and might as well mkgroup to recreate
> the /etc/group file).  They both write to stdout so you have to
> redirect them:
> 
> mkpasswd>  /etc/passwd
> 
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> 
>    
Yep the SYSTEM is listed alright. I already created the passwd file multiple times, before and after ssh installation. I do not know what all those numbers in it but as far as I can see the users and their default folders listed fine there. I can pretty much see all the defined users including the ssh setup based users.

"mkpasswd -cl > /etc/passwd" was the command I have used multiple times.


The weird thing was that the Cygwin+Ssh installation on Win7 was the easiest of all installations I had done before. It worked for couple days and stopped yesterday. Something is funky and I cannot figure it out after spending 10 hours on this. I am sure it is couple minutes fix if you are an expert on this stuff but that is the best i can do on my own.






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


      

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019