网站地图    收藏   

主页 > 系统 > windows >

CYGWIN SSH Server配置 - Windows操作系统 - 自学php

来源:自学PHP网    时间:2015-04-17 17:13 作者: 阅读:

[导读] CYGWIN SSH Server配置Cygwin是许多软件的集合,最初由Cygnus Solutions开发,用于各种版本的Microsoft Windows上,运行UNIX类系统。Cygwin的主要目的是通过重新编译,将POSIX系统(例如Linux、BSD,以及...

CYGWIN SSH Server配置
 
Cygwin是许多软件的集合,最初由Cygnus Solutions开发,用于各种版本的Microsoft Windows上,运行UNIX类系统。Cygwin的主要目的是通过重新编译,将POSIX系统(例如Linux、BSD,以及其他Unix系统)上的软件移植到Windows上。
安装了Cygwin之后,就可以像操作Unix那样的操作windows了,下面简要介绍一下如何在Cygwin上面配置SSH服务,使得可以从远程的机器上访问这台Windows。
 
1. 给文件授权,以完成sshd 服务的安装
chmod +r /etc/group
chmod +r /etc/passwd
chmod +rwx /var
 
2. 安装 sshd 服务
 
$ ssh-host-config
 
*** Query: Overwrite existing /etc/ssh_config file? (yes/no) yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Updating /etc/sshd_config file
 
*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: [] ntsec
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
 
*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later. On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).
 
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used 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' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Please enter the password for user 'cyg_server':
*** Query: Reenter:
 
 
*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
 
*** Info: Host configuration finished. Have
 
Administrator@backup ~
$ cygrunsrv.exe -S sshd  # 启动 SSH服务
 
安装完成后,系统服务中应该会有 CYGWIN sshd服务
一切正常,即可启动ssh服务. 登录的用户名是cyg_server, 密码是配置是设置的密码
 
 
3. 使用 windows 用户本地认证
 
mkpasswd -l > /etc/passwd  使用windows 用户的密码
mkgroup -l > /etc/group    使用windows 用户组

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论