cygwin配置 ssh服务(windows7)

 ssh-host-config # 引导SSH服务配置
*** Info: Generating /etc/ssh_host_key
*** Info: Generating /etc/ssh_host_rsa_key
*** Info: Generating /etc/ssh_host_dsa_key
*** Info: Creating default /etc/ssh_config file
*** 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/READ
ME.privsep.
*** Query: Should privilege separation be used? (yes/no) yes #输入yes
*** Info: Updating /etc/sshd_config file
*** Warning: The following functions require administrator privileges!
*** Query: Do you want to install sshd as a service?
*** Query: (Say \"no\" if it is already installed as a service) (yes/no) yes #输入yes
*** Info: Note that the CYGWIN variable must contain at least \"ntsec\"
*** Info: for sshd to be able to change user context without password.
*** Query: Enter the value of CYGWIN for the daemon: [ntsec] ntsec #输入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 2003 Server or later. On 2003 and
*** Info: later systems, it\'s not possible to use the LocalSystem account
*** Info: for services that can change the user id without an explicit password
*** Info: (such as passwordless logins [e.g. public key authentication] via sshd
).
*** Info: If you want to enable that functionality, it\'s required to create a ne
w
*** Info: account with special privileges (unless a similar account already exis
ts).
*** Info: This account is then used to run these special servers.
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges itself.
*** Info: No privileged account could be found.
*** 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 #输入no,不指定启动用户
*** Query: Create new privileged user account \'cyg_server\'? (yes/no) no #输入no,不指定启动用户
*** ERROR: There was a serious problem creating a privileged user.
*** Query: Do you want to proceed anyway? (yes/no) yes #输入yes
*** Warning: Expected privileged user \'cyg_server\' does not exist.
*** Warning: Defaulting to \'SYSTEM\'
*** Info: The sshd service has been installed under the LocalSystem
*** Info: account (also known as SYSTEM). To start the service now, call
*** Info: `net start sshd\' or `cygrunsrv -S sshd\'. Otherwise, it
*** Info: will start automatically after the next reboot.
*** Info: Host configuration finished. Have fun!
Administrator@backup ~
$ cygrunsrv.exe -S sshd # 启动 SSH服务
14. 安装完成后,检查一下系统服务中是否有 CYGWIN sshd 服务, 无启动帐号.
15. 检查系统用户 sshd 是否已启用, 并属于管理员组.
16. 一切正常,即可启动ssh服务. 登录的用户名是sshd, 密码是 sshd用户的密码.
注意: 使用 windows 用户本地认证
mkpasswd -l > /etc/passwd 使用windows 用户的密码
mkgroup -l > /etc/group 使用windows 用户组

配置完成后,你可以使用SecureCRT或者 putty等软件登陆连接ssh

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值