Install cygwin + OpenSSH in Windows

Source: Internet
Author: User

 

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,

 

 

 

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.