如何使用Cygwin在Windows上运行OpenSSH SSHD服务器

记录几款非常有趣, 但不怎么耳熟的软件:

 

 

Cygwin 是可以安装 OpenSSH server 和 client 的, Mosh 也可以, 这对于 Linux 用户而言就非常方便了.

如何使用Cygwin在Windows上运行OpenSSH SSHD服务器

http://www.noah.org/ssh/cygwin-sshd.html

Install the following Cygwin packages (rerun setup if necessary -- you can add packages after you have already installed Cygwin).

Admin --> cygrunsrv
Net --> openssh

Open a new bash shell window and run the SSH configure stuff.

ssh-host-config -y

This step will create necessary configuration files, a priviledge separation user and necessary directories.

When prompted with "CYGWIN=" type for following:

tty ntsec

Now you are ready to start the service.

cygrunsrv -S sshd

Finished

Bugs

Sometimes you get a sshd/cygrunsrv service error after trying to run the service.

cygrunsrv: Error starting a service:
QueryServiceStatus: Win32 error 1062:
The service has not been started.

There can be a couple of causes for this. The following may fix the problem (this is not an option on XP Home).

Solution 1.

You may have an old or corrupt installation of Cygwin. Try reinstalling. The following may also help:

cygrunsrv -R sshd
REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)
run "ssh-host-config -y" again.
This seemed to help on a few systems I worked on.

Solution 2.

Open an explorer window and use the "Properties | Security" dialog and explicitly add "Full Control" for the SYSTEM user to the following directories:

C:\Cygwin
C:\Cygwin\var
C:\Cygwin\var\log

Hope that helps!

 

OpenSSH server 安装后是一个叫 CYGWIN sshd 的服务, 如果启动失败, 需要更改为本地登录.

转载于:https://www.cnblogs.com/develon/p/9977882.html

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值