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: Cannot run SSH


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@gmail.com>
To: cygwin@cygwin.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


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