cygwin-Installing and configuring the SSH service

Source: Internet
Author: User
Tags posix unsupported

Cygwin Introduction:

Cygwin is a UNIX-like simulation environment that runs on the Windows platform, It is for learning unix/ Linux operating environments, or porting applications from UNIX to Windows, or doing some special development work, especially using the GNU toolset for Embedded system development on Windows , is useful.

Because you want to learn about the Hadoop Distributed file system, you want to simulate a Linux environment under window for deployment. So think of using Cygwin tools.

Let's start with a few of the issues I encountered during the installation process:

1. It is best to install those services to install, according to their actual needs, I once installed because of the missing OpenSSH, and then re-installed,

2. Reinstall can not be uninstalled first, directly click on the Setup.exe, to install,

3. Select the download site to choose the default is good http://mirrons.163.com.

4. It is always an error to configure no password when installing the SSH service

The error is as follows: Delete the. ssh folder, login with password is also unsuccessful. Tried several times, also re-installed Cygwin64 bit or invalid, finally installed Cygwin32 bit can.

[Email protected] ~$  cd ~/.ssh[email protected]~/.ssh$ ssh localhost[email protected] ' s password:      2 [main] sshd 3 804 D:\SofeWare\cygwin\usr\sbin\sshd.exe: * * * fatal Error-ntcreateevent (lock): 0xc0000058connection to localhost Closed.

Note When configuring SSH, Yes/no's choice to be careful, careless will be wrong.

[email protected] ~$ ssh-host-config*** info:generating missing SSH host keysssh-keygen:generating new host Keys:r SA1 RSA DSA ECDSA ed25519*** info:creating default/etc/ssh_config file*** info:creating default/etc/sshd_config file** * Info:strictmodes is set to ' Yes ' by default.*** Info:this are the recommended setting, but it requires that the posix** * Info:permissions of the user ' s home directory, the user's ssh*** info:directory, and the user's SSH key files are TIG HT so that*** info:only the user have write permissions.*** info:on the other hand, strictmodes don ' t work well with DEFA ult*** info:windows permissions of a home directory mounted with the*** Info: ' noacl ' option, ' and ' They don ' t work at all If the home*** info:directory is on a FAT or FAT32 partition.*** query:should strictmodes being used?  (yes/no) no*** info:privilege separation is set to ' sandbox ' by default since*** info:openssh 6.1. This was unsupported by Cygwin and have to be set*** info:to ' yes ' or ' no '. * * * info:however, using privilege separation requires a non-privileged account*** info:called ' sshd '. * * * Info:  for + info on privilege separation read/usr/share/doc/openssh/readme.privsep.*** query:should privilege separation be Used? (yes/no) no*** info:updating/etc/sshd_config file*** 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*** in Fo:on Windows Server 2003, Windows Vista, and above, the*** Info:system account cannot setuid to other users--a Capabi  lity*** info:sshd requires.  You need to has or to create a privileged*** info:account. This script would help you does so.*** Info:it ' s not possible to use the LocalSystem account for services*** Info:that can Change the user ID without a explicit password*** Info: (such as passwordless logins [e.g. public key authentication]*** Info:via sshd) When have to create the userToken from scratch.*** info:for more information on this requirement, see*** info:https://cygwin.com/cygwin-ug-net/ntsec . html#ntsec-nopasswd1*** info:if you want to enable that functionality, it's required to create*** info:a new account WI Th special privileges (unless such an account*** info:already exists). This account was then used to run these special*** info:servers.*** info:note that creating a new user requires that the Current account*** info:have Administrator privileges itself.*** info:no privileged account could being found.*** Info:thi s script plans to use ' cyg_server '. * * * Info: ' cyg_server ' is only being used by registered services.*** Query:do you want To use a different name? (yes/no) no*** query:create new Privileged user account ' Lyx\cyg_server ' (Cygwin name: ' Cyg_server ')? (yes/no) no*** Error:there was a serious problem creating a privileged user.*** query:do do want to proceed anyway? (yes/no) no[email protected] ~$ ssh-host-config*** info:generatinG Missing SSH host keys*** query:overwrite existing/etc/ssh_config file? (yes/no) yes*** info:creating default/etc/ssh_config file*** query:overwrite existing/etc/sshd_config file? (yes/no) yes*** info:creating default/etc/sshd_config file*** info:strictmodes is set to ' Yes ' by default.*** Info:thi  S is the recommended setting, but it requires that the posix*** info:permissions of the user's home directory, the user ' s . ssh*** info:directory, and the user ' s SSH key files is tight so that*** info:only the user have write permissions.***  Info:on the other hand, strictmodes don ' t work well with default*** info:windows permissions of a home directory mounted With the*** Info: ' noacl ' option, and they-t work at all if the home*** info:directory are on a FAT or FAT32 partitio n.*** query:should strictmodes be used?  (yes/no) yes*** info:privilege separation is set to ' sandbox ' by default since*** info:openssh 6.1. This was unsupported by Cygwin and have to be set*** info:to ' Yes ' or ' no '. * * * info:however, using privilege separation requires a non-privileged account*** info:called ' sshd '. * * * Info:for More info on privilege separation read/usr/share/doc/openssh/readme.privsep.*** query:should privilege Separat Ion be used? (yes/no) no*** info:updating/etc/sshd_config file*** 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: [] netsec*** I Nfo:on Windows Server 2003, Windows Vista, and above, the*** Info:system account cannot setuid to other users--a capab  ility*** info:sshd requires.  You need to has or to create a privileged*** info:account. This script would help you does so.*** Info:it ' s not possible to use the LocalSystem account for services*** Info:that can Change the user ID without a explicit password*** Info: (such as passwordless logins [e.g. public key authentication]*** Info:via sshd) when have to create thE User token from scratch.*** info:for more information on this requirement, see*** Info:https://cygwin.com/cygwin-ug-ne t/ntsec.html#ntsec-nopasswd1*** info:if you want to enable that functionality, it's required to create*** info:a new ACC Ount with special privileges (unless such an account*** info:already exists). This account was then used to run these special*** info:servers.*** info:note that creating a new user requires that the Current account*** info:have Administrator privileges itself.*** info:no privileged account could being found.*** Info:thi s script plans to use ' cyg_server '. * * * Info: ' cyg_server ' is only being used by registered services.*** Query:do you want To use a different name? (yes/no) yes*** query:enter The new user name:l*** query:reenter:l*** query:create new Privileged user account ' lyx\l Yx ' (Cygwin name: ' L ')?  (yes/no) yes*** info:please Enter a password for new user LyX. sure*** info:that This password matches the password rules given On your system.*** info:entering no password would exit the configuration.*** Query:please enter the password:*** Query:  reenter:*** warning:creating The user ' L ' failed! Reason:?û????????????????????????? NET helpmsg 2253??? O????????? Error:there was a serious problem creating a privileged user.*** query:do do want to proceed anyway? (yes/no) yes*** warning:expected Privileged user ' lyx ' does not exist.*** warning:defaulting to ' SYSTEM ' * * * info:the SS HD Service has been installed under the localsystem*** Info:account (also known as SYSTEM).  To start the service now, call*** Info: ' net start sshd ' or ' cygrunsrv-s sshd '.  Otherwise, it*** Info:will start automatically after the next reboot.*** warning:host configuration exited with 1 errors or warnings!*** warning:make sure that all problems reported is fixed,*** Warning:then re-run ssh-host-config. [email protected] ~$ ssh localhostthe authenticity of host ' localhost (:: 1) ' can ' t be established. ECDSA key FingerPrint is SHA256:5/I9VVXBBFIQHZLREKD9UQPPHKZ7NC+9ZNWCWLN+QHK. Is you sure want to continue connecting (yes/no)? yeswarning:permanently added ' localhost ' (ECDSA) to the list of known hosts. [email protected] ' s password:[email protected] ~$ whoadministrator pty1 2015-07-24 09:39 (:: 1)

Installation materials:

There are a lot of online installation materials, I will not repeat.

installing through Cygwin on Windows systems hadoop:http://my.oschina.net/u/570654/blog/112757follow this installment to Cygwin.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

cygwin-Installing and configuring the SSH service

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.