LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (http://www.linuxquestions.org/questions/general-10/)
-   -   Cygwin. How to delete and reset ssh so it can be setup clean again. (http://www.linuxquestions.org/questions/general-10/cygwin-how-to-delete-and-reset-ssh-so-it-can-be-setup-clean-again-4175499948/)

Mes9 03-30-2014 10:57 AM

Cygwin. How to delete and reset ssh so it can be setup clean again.
 
I've been trying to setup my network with ssh, but I can't seem to make it work on my Windows 7. It was working at first, but after I wanted to make changes I messed it all up. Now I can't can't get it to work, I get this error:
ssh-host-config ....
Code:

/usr/bin/cygrunsrv: Error installing a service: CreateService:  Win32 error 1057:
The account name is invalid or does not exist, or the password is invalid for the account name specified.

*** ERROR: Installing sshd as a service failed!

*** Warning: Host configuration exited with 1 errors or warnings!
*** Warning: Make sure that all problems reported are fixed,
*** Warning: then re-run ssh-host-config.

This happens every time, even if I uninstall and re-install it just comes down to same error.
How can I reinstall ssh and cygrunsrv so that it is clean and can be installed fresh.(delete config files, this is what I think is doing the damage, because it's the same error even after re-install)
Please help.

Addiction 03-31-2014 09:48 AM

This looks like a problem with your Windows services. It is not allowing SSHD to install as a service for whatever reason. Without it being installed as a service (which runs at boot) to ensure you can SSH into the system at anytime, Cygwin will not work. I would check to maybe see if you have an infection or some type of virus/rootkit (Malwarebytes and TDSSKiller will take care of most everything). Also, look for Windows Service repair tools or something that will restore your services to default.

Doug G 03-31-2014 12:49 PM

I had copied these instructions from a no-longer-existing web page, but a couple years back I uninstalled cygwin sshd completely from a w7pro machine: Use these steps at your own risk, by the way :)
Quote:

For Windows XP.
To remove Cygwin sshd in the cleanest possible way:

Disclaimer

cygrunsrv -E sshd

cygrunsrv -R sshd

delete the folder c:\cygwin and all its sub-folders

remove the Environment Variable CYGWIN

edit the Environment path accordingly

Start...Run... regedit and delete these two registry trees

"HKEY_CURRENT_USER_Software_Cygnus Solutions"

"HKEY_LOCAL_MACHINE_Software_Cygnus Solutions"

Go to Control Panel, Category View, Performance and Maintenance, Administrative Tools, Computer Management.
or click Start...Run...compmgmt.msc
delete the sshd user if it exists in the "System Tools" - "Local Users and Groups" - "Users" section.
EDIT: These steps were originally for XP, and you may need to re-install cygwin afterwards.

Mes9 04-01-2014 09:41 AM

Quote:

Originally Posted by Doug G (Post 5144158)
I had copied these instructions from a no-longer-existing web page, but a couple years back I uninstalled cygwin sshd completely from a w7pro machine: Use these steps at your own risk, by the way :)

EDIT: These steps were originally for XP, and you may need to re-install cygwin afterwards.

Thank's man, I'm trying to re-install after following your steps. Hope it works now


All times are GMT -5. The time now is 01:58 PM.