OpenSSH server windows 7 set up practice

Reference links

http://www.worldgoneweb.com/2011/installing-openssh-on-windows-7/

Recently, an idea that is in your own computer to open a ssh service, and then when the remote If you need to work on their computers only need to ssh to connect to their computer and then connect to their computer IP with mstsc remote desktop on it .

1.下载OpenSSH:http://sourceforge.net/projects/sshwindows/files/OpenSSH%20for%20Windows%20-%20Release/3.8p1-1%2020040709%20Build/setupssh381-20040709.zip/download

2. Install, anyway, I was all by default all the way down, jump out of a window to edit the warning said during the passwd file, OK to continue to do so.

3. Switch to the bin installation directory under SSH

4.

# 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 you look in ..\etc\passwd, you will see entries (one per line) for all your Windows users.

# Start the server in debug mode
cd ..\usr\sbin
sshd -d -d -d

The following prompt appears

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 that your private key files are NOT accessible by others.
This private key will 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 that your private key files are NOT accessible by others.
This private key will 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. It can be seen that rights profile is not configured, then the chown chmod

cd ..\..\etc
..\bin\chown <username> *
..\bin\chmod 600 *

7. cygwin dll file seemingly found a problem, which provides a reference link posted dll files updated and the cygwin1.dll cygintl-2, the address is http://samanthahalfon.net/resources/cygwin_includes.zip, in which the two dll unzip cover old files in the bin directory, if prompted insufficient permissions, probably because cygrunsrv process is still alive, used this dll file, kill process is complete replacement cygrunsrc

8. Restart opensshd Service

net start opensshd

9. The system prompts the service starts successfully, we can use the command ssh or putty to try it

ssh <username>@<ip_windows_machine>

# You will be prompted to accept the authenticity of host, type yes
# You will be prompted for a password
# Enter your windows password

10. The trial is successful, the connection to their own machine

 

 

Reproduced in: https: //www.cnblogs.com/ericsun/archive/2012/06/10/2544413.html

Guess you like

Origin blog.csdn.net/weixin_34409703/article/details/93154941