Sshd cannot start cygwin installation process due to logon Failure

Source: Internet
Author: User

When cygwin is installed, execute ssh-host-config and the following information is displayed:

Wood has the following requirements:

* ** Warning: the following functions require administrator privileges!

* ** Query: Do you want to install sshd as a service?
* ** Query: (say "no" if it is already installed as a Service) (Yes/No) Yes
* ** Query: Enter the value of cygwin for the daemon: []
Ntsec tty
* ** Info: on Windows Server 2003, Windows Vista, and above,
* ** Info: system account cannot setuid to other users -- a capability
* ** Info: sshd requires. You need to have or to create a privileged
* ** Info: account. This script will help you do so.

* ** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
* ** Info: or later. On these systems, it's not possible to use the LocalSystem
* ** Info: account for services that can change the user ID without
* ** Info: explicit password (such as passwordless logins [e.g. Public Key
* ** Info: authentication] via sshd ).

* ** Info: If you want to enable that functionality, it's required to create
* ** Info: a new account with special privileges (unless a similar account
* ** Info: already exists). This account is then used to run these special
* ** Info: servers.

None of the above occurs, and the following problems occur during the execution of Net start sshd:

System Error 1069 occurs.
The service cannot be started due to logon failure.

-- This is caused by incorrect user password input. This problem may occur in sshd after the user is changed in the future. You can change the user settings in the logon tag in services. MSC!

Enter the account and password, and the following error is reported during startup:

(1) An error is always reported when cygwin is started. If cygwin cannot be started or the specific cause is reported, it is okay to log on to the Administrator and try again ~

If the administrator cannot start up, check whether port 22 has been started. Check whether the sshd service has been installed on wood ~

Probably because of the previous warning:

There is another situation:

If an error still persists after logging on to the Administrator, go to/var/log/to view sshd. log. The error message is as follows:

/Var/empty must be owned by root and not group or world-writable.

Then you only need to execute:

Chown administrator: Administrators/var/empty

Restart the sshd service again to start the service normally ~

There is another situation:

If the virtual machine is deployed, the following will occur: it cannot be started at the beginning. If you enter the cygwin password again, it can be started, but the following error is always reported:

$ SSH localhost
Administrator @ localhost's password:
Last login: Thu Oct 18 18:20:00 2012 from 127.0.0.1
/Bin/Bash: operation not permitted
Connection to localhost closed.

If no problem is found during troubleshooting, you can only start it with administrator. Then you can modify the log permission ~

(2) If it is still unable to start after it is changed to Administrator after it is started, check the cygwin sshd service and check that the path pair is not read. The startup error is returned:

Run "Net start sshd" or "cygrunsrv-s sshd (start sshd service)". The following message is displayed:

System Error 3

At this time, I was really lucky. I couldn't find the answer on the Internet, but I knew the idea, that is, the previously installed information has been deleted, and the information saved in the registry is still the previous information. So I thought about deleting the service:

Administrator @ localhost ~
$ SC Delete sshd
[SC] deleteservice successful
Or:

Cygrunsrv-r sshd (delete sshd service)


Reinstall the Configuration:

Administrator @ localhost ~
$ Ssh-host-config

At this time, it will be displayed normally. The total content to be entered is as follows:

######################################## ##############

Chmod + R/etc/passwd
Chmod + R/etc/group
Rm-RF/var/
Ssh-host-config
Yes
Yes
Yes
Ntsec tty
Yes
Cygwin
Cygwin
Yes
$ Password
$ Password

Net start sshd
Mkpasswd-L>/etc/passwd
Mkgroup-L>/etc/group
SSH localhost
Yes
$ Hostpassword

######################################## ##############

Note:

If the format is not ntsec tty, the following error may be prompted after remote Logon:

[Administrator @ NXY-2. Ssh] $ SSH 192.168.30.204
Last login: Mon Aug 13 18:17:54 2012 from 192.168.30.172
"Tty" option detected in cygwin environment variable.
Cygwin = tty is no longer supported. Please remove it from your
Cygwin environment variable and use a terminal emulator like mintty,
Xterm, or rxvt.

Administrator @ icbc-host-204 ~

######################################## ###############

######### How to solve the garbled characters during startup. Chinese characters are not supported ###########

######################################## ###############

You can use ls to view the file names in Chinese format, but the following occurs when you execute Net start sshd:

View the system code:

Check the cygwin encoding:

Change the cygwin encoding format ~

After the instance is started again, the following information is displayed:

(3) If you delete the sshd service by appeal, but you still mark the original path and the service is disabled when you check the service, you can modify the registry:

Open HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ sshd \ ImagePath, edit and modify the string value [change to the path of your current cygwin executable program]

The following result is displayed in the service:

The path is correct. You can change the Startup Type to automatic and save it, but the following error is still reported:

Note:

The variable value of cygwin is in HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ sshd \ Parameters \ environment \ cygwin

In, if you want to modify it, open the modification value directly and then OK ~

If the following problem occurs, change netsec tty to the mintty prompt ~

[Administrator @ ZY ~] $ SSH 172.16.1.20.
Administrator@1172.16.1.137's password:
Last login: Wed Oct 17 17:25:40 2012 from 172.16.1.136
"Tty" option detected in cygwin environment variable.
Cygwin = tty is no longer supported. Please remove it from your
Cygwin environment variable and use a terminal emulator like mintty,
Xterm, or rxvt.

Administrator @ ZY ~

PS:

You can install a SYSLOG software package, and the remote login is very dazzling, haha ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.