Windows 7 Erection OpenSSH Server Practice _win Server

Source: Internet
Author: User
Tags chmod ssh file permissions openssh server

A recent idea is to open an SSH service on your own computer, and then, if you need to work on your computer remotely, just SSH to your computer and connect to your computer's IP with mstsc Remote Desktop.

1. Download openssh:http://www.jb51.net/softs/420320.html
2. Installation, anyway I was all the way down by default, during the period of jumping out of a window to edit the passwd file warning, OK continue to go on.
3. Switch to the bin under the SSH installation directory
4.

Copy Code code as follows:

# Create the default groups
Mkgroup-l >> ... /etc/group
#create the default Users
Mkpasswd-l >> ... /etc/passwd
# Note:for Neither of the above commands did I bother with the domain version documented in the QuickStart
# Now, if it's in. /ETC/PASSWD, you'll be entries (one per line) for all your Windows users.
# Start the server in debug mode
Cd.. /usr/sbin
Sshd-d-d-d

5. The following prompts appear

Copy Code code as follows:

Debug1:sshd version Openssh_3.8.1p1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ warning:unprotected PRIVATE KEY file! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/etc/ssh_host_rsa_key ' are too open.
It is recommended this your private key files are not accessible by others.
This private key would be ignored.
Bad Permissions:ignore key:/etc/ssh_host_rsa_key
Could not load host key:/etc/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ warning:unprotected PRIVATE KEY file! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/etc/ssh_host_dsa_key ' are too open.
It is recommended this your private key files are not accessible by others.
This private key would be ignored.
Bad Permissions:ignore key:/etc/ssh_host_dsa_key
Could not load host key:/etc/ssh_host_dsa_key
Disabling Protocol version 2. Could not load host key
Sshd:no Hostkeys available--exiting.

6. You can see that the configuration file permissions are not configured well, so chown chmod

Copy Code code as follows:

Cd.. /.. /etc
.. /bin/chown <username> *
.. /bin/chmod 600 *

7. Found that seemingly cygwin DLL file out of the problem, the reference post provides updated DLL file links cygintl-2 and cygwin1.dll, address is Http://samanthahalfon.net/resources/cygwin_ Includes.zip, two of these DLLs to overwrite the old file in the bin directory, if prompted insufficient permissions, probably because the cygrunsrv process is still alive, using this DLL file, kill CYGRUNSRC process complete replacement

8. Restart OPENSSHD Service

net start opensshd

9. System prompts the service to start successfully, we can use SSH command or putty to test

Copy Code code as follows:

SSH <username>@<ip_windows_machine>
# you'll be prompted to accept the authenticity of host, type Yes
# You'll be prompted for a password

# Enter Your Windows password

10. The test was successful and connected to your own machine.

Note:

Sshd-d-d-d does not execute, but does not affect the process of the start and stop OpenSSH service.
sshd.exe– system error
This program cannot be started because Cygcrypto-0.9.7.dll is missing from the computer. Try reinstalling the program to resolve this issue.

Related Article

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.