1.
After installing JDK, I installed JDK on drive D, specifically: D:/Java/jdk1.6.0 _ 20
2.
Install cygwin online, the image selected during installation is a http://www.cygwin.cn/pub/, the installation process to select the Net Package on OpenSSH and OpenSSL options
My installation directory is D:/cygwin
3.
After installation, in my computer environment variables,
Set java_home to D:/Java/jre6,
Add D:/Java/jdk1.6.0 _ 20/bin; D:/cygwin/usr/sbin to path.
4.
Open cygwin command line
5. Enter the command: SSH-host-config
Next, you need to answer some questions to continue.
1)
When asked if privilege
Separation shoshould be used, answerNo.
2)
When asked if sshd shoshould be
Installed as a service, answerYes.
3) When
Asked about the value of cygwin environment variable enter Ntsec.
4)
As follows:
6.
Start the cygwin sshd service and enter: Net
Start sshd.
7.
Configure SSH Login
1)
Enter ssh-keygen, and then directly press enter to obtain the default value.
2) Input: Cd ~ /. SSH
3)
Enter LS-L and you will seeId_rsa.pub And Id_rsaTwo files
4) Input:Cat id_rsa.pub>
Authorized_keys.
5) Input:SSH localhost, the first time you are asked whether to continue the connection, enter: Yes. Enter SSH localhost again, and you will find that the previous inquiry is missing.
6) Input: WHO. A similar result is returned. Otherwise, an error may occur.
7) Process
8) Enter exit to log out of SSH,
8.
Input: net stop sshd to disable the cygwin ssdh service,