1. Running Ssh-host-config
Note Here is the Red section, enter the user name or password to conform to the computer's user name or password policy (especially the company has permission to restrict the computer).
$ ssh-host-config Query:overwrite Existing/etc/ssh_configfile? (yes/No) YesInfo:creating Default/etc/ssh_configfileQuery:overwrite Existing/etc/sshd_configfile? (yes/No) YesInfo:creating Default/etc/sshd_configfileInfo:privilege separation is set to Yes by default since OpenSSH3.3.Info:however, this requires a non-privileged account called'sshd'.Info:for More InfoOn privilege Separation read/usr/share/doc/openssh/readme.privsep.Query:should privilege separation be used? (yes/No) YesWarning:sshd isinch/etc/passwd, but theWarning:local Machine's SAM does not know about sshd.Warning:perhaps Sshd is a pre-existing domain account.Warning:continuing, but checkifThis is OK.Info:updating/etc/sshd_configfileQuery:do want toInstallSshd as a service?*** Query: (Say"No" ifIt is already installed as a service) (yes/No) YesQuery:enter the value of CYGWIN forThe daemon: []Info:on Windows Server2003, Windows Vista, and above, theInfo:system account cannot setuid to other users--a capability***info:sshd requires. You need to has or to create a privilegedInfo:account. This script would help you DoSo .Warning:cyg_server isinch/etc/passwd, but the localWarning:machine's SAM does not know about Cyg_server.Warning:perhaps Cyg_server is a pre-existing domain account.Warning:continuing, but checkifThis is OK.Info:you appear to be running Windows XP 64bit, windows2003Server,Info:or later. On these systems, it's not possible to use the LocalSystemInfo:account forServices that can change the userIDwithout an***info:explicit password (such as passwordless logins [e.g. public key***Info:authentication] via sshd).Info:if want to enable that functionality, it's required to create***info:a new account with special privileges (unless a similar accountInfo:already exists). This account is Thenused to run these special***info:servers.***Info:note that creating a new user requires that the current account***Info:have Administrator privileges itself.Info:the following privileged accounts were found:'Cyg_server' .Info:this script plans to use'Cyg_server'.Info:'Cyg_server'Would is used by registered services.Query:do want to use a different name? (yes/No) Yes***query:enter The new user name:cyg_user123***Query:Reenter:cyg_user123Query:create New Privileged User account'cyg_user123'? (yes/No) YesInfo:please Enter a password forNew User cyg_user123. Please be 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:Info:user'cyg_user123'have been created with password'tough_01'.***info:if The password, please remember alsoInfo:password forThe Installed serviceswhichUse (or would soon use)Info:the'cyg_user123'Account .Info:also KeepinchMind, the user'cyg_user123'needs Read PermissionsInfo:on All Users'relevant files for the services running as'Cyg_user123'.Info:in particular, forThe SSHD server all users'. Ssh/authorized_keys***Info:files must has appropriate permissions to allow public keyInfo:authentication. (re-) runningSSH-user-config forEach user would setInfo:these permissions correctly. [Similar restrictions Apply, forInfo:instance, for. rhosts Filesifthe rshd server is running, etc].Info:the sshd Service has been installed under the'cyg_user123'Info:account. To start the service now, call ' net start sshd'orInfo: ' Cygrunsrv-s sshd'. Otherwise, it'll start automatically***Info:after the next reboot.* * * info:host configuration finished. Have fun!
The last word indicates that the SSH service was successfully installed.
2. Start sshd Service
$ net start sshdthe CYGWIN sshd service is starting. The CYGWIN sshd service was started successfully.
3. Local SSH connection test
$SSHlocalhostthe authenticity of host'localhost (:: 1)'Can't be established.ECDSA Key fingerprint is -: 4f: -: 3e:f7: -: 3f:a2:d2: -: -: f5:1b: the: -: FB. Is you sure want to continue connecting (yes/no)?Yeswarning:permanently added'localhost'(ECDSA) to the list of known hosts. [Email protected]'s Password:
4, with SECURECRT connection Cygwin this machine
Connection Address: 127.0.0.1
Connection port: 22
User name password: The user name and password of their own machine, not the previously configured cyg_user123
Cygwin SSH Service configuration (securecrt connection Cygwin configuration)