1. download setup.exe from [url] www.cywin.com [/url] to install the Bootstrap program 2. double-click setup.exe to start installation 3. select the installation source install for Internet (if there is a software package downloaded from the Internet last time, you can select install for local directory to select the directory to store) 4. define the installation directory c:/cygwin (1) install for: all users (2) default text file type: Unix/binary 5. define the directory where the downloaded software is stored (you can use the downloaded package to install it from the local hard disk next time ). g:/download/cywin 6. select the Internet connection type and select 7 according to your actual situation. select an image download site 8. select the installation package (1) admini and select cygrunsrv (2) Select: cygwin-DOC (3) Net: OpenSSH 9. cywin automatically downloads the selected software package and installs it. 10. add the variable cygwin = ntsec to my computer-> properties-> advanced-> environment variables, and add the cygwin/bin path to the path environment variable, for example:; C: /cygwin/bin 11. double-click the cywin icon installed on Windows to start cywincopying skeleton files.
These files are for the user to personalise
Their cygwin experience. These will never be overwritten. './. bashrc'-> '/home/Administrator //. bashrc'
'./. Bash_profile'-> '/home/Administrator //. bash_profile'
'./. Inputrc'->'/home/Administrator //. inputrc' 12. Authorize the file to install chmod + R/etc/group in sshd.
Chmod + R/etc/passwd
Chmod + rwx/var 13. install sshd service $ ssh-host-config detailed installation steps and input parameters, as shown in the following example: copying skeleton files. these files are for the user to personalisetheir cygwin experience. these will never be overwritten. '. /. bashrc '->'/home/Administrator //. bashrc ''. /. bash_profile '->'/home/Administrator //. bash_profile ''. /. inputrc '->'/home/Administrator //. inputrc 'administrator @ backup ~ $
Chmod + R/etc/group #
File PermissionAdministrator @ backup ~ $
Chmod + R/etc/passwd #
File PermissionAdministrator @ backup ~ $
Chmod + rwx/var /#
File Permission
Administrator @ backup ~ $
Ssh-host-config #
Guide
SSH
Service configuration
* ** Info: generating/etc/ssh_host_key *** info: generating/etc/ssh_host_rsa_key *** info: generating/etc/ssh_host_dsa_key *** info: creating default/etc/ssh_config file *** info: Creating default/etc/sshd_config file *** info: Privilege Separation is set to yes by default since OpenSSH 3. 3. * ** info: However, this requires a non-privileged account called 'sshd '. * ** info: for more info on privilege s Eparation read/usr/share/doc/OpenSSH/readme. privsep. *** query: shocould Privilege Separation be used? (Yes/No)
Yes #
Input
Yes* ** Info: updating/etc/sshd_config file ** warning: The following funwing 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 #
Input
Yes* ** Info: note that the cygwin variable must contain at least "ntsec" *** info: For sshd to be able to change user context without password. * ** query: Enter the value of cygwin for the daemon: [ntsec]
Ntsec #
Input
Ntsec* ** Info: on Windows Server 2003, Windows Vista, and above, the *** 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 2003 Server or later. on 2003 and *** info: Later systems, it's not possible to use the LocalSystem account * ** Info: for services that can change the user ID without an explicit password *** info: (such as passwordless logins [e.g. public Key Authentication] via sshd ). * ** info: If you want to enable that functionality, it's required to create a new *** info: account with special privileges (unless a similar account already exists ). * ** info: This account is then used to run these special servers. * ** info: Note that creating a new user requires that the current account have *** info: Administrator privileges itself. * ** info: no privileged account cocould be found. * ** info: This script plans to use 'cyg _ Server '. * ** info: 'cyg _ Server' will only be used by registered services. * ** query: Do you want to use a different name? (Yes/No)
No #
Input
No
, Do not specify start user* ** Query: Create new privileged user account 'cyg _ Server '? (Yes/No)
No #
Input
No
, Do not specify start user* ** Error: there was a serious problem creating a privileged user. *** query: do you want to proceed anyway? (Yes/No)
Yes #
Input
Yes* ** Warning: Expected privileged user 'cyg _ Server' does not exist. * ** warning: defaulting to 'system' *** info: the sshd 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. * ** info: Host Configuration finished. Have fun! Administrator @ backup ~ $
Cygrunsrv.exe-s sshd #
Start
SSH
Service
14. after the installation is complete, check whether the cygwin sshd service exists in the system service. 15. check whether sshd is enabled and belongs to the Administrator group. 16. everything works. You can start the SSH service. the logon username is sshd and the password is sshd. note: use Windows User Local authentication mkpasswd-L>/etc/passwd use Windows user's password mkgroup-L>/etc/group use Windows User Group
This article from dingtalk blog, please be sure to keep this source http://nails.blog.51cto.com/640492/144025