端口 22 的 cygwin 连接被拒绝
我已经在 Windows 7 中安装了 cygwin 但出现以下错误
$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
I have installed cygwin in windows 7 but i get the following error
$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我遇到了同样的问题,但我在 CYGWIN 命令行上运行了它并且它起作用了:
之后我执行了命令
ssh -v localhost
并且错误消息没有显示。希望这有帮助!I faced the same problem but I ran this on the CYGWIN command line and it worked :
After that I executed the command
ssh -v localhost
and the error message didn't show up. Hope that this helps !.如果您在 Windows XP 中遇到此问题,请按照以下步骤打开 ssh 端口:
这将帮助您从 cygwin 打开 ssh
对于 Windows 上的 hadoop 等本地应用程序开发,请更改自定义列表中的范围
localhost /ip 地址
。If you are facing this problem in Windows XP follow these steps to open port for ssh:
This will help you open ssh from cygwin
For local application development like hadoop on windows please change the scope
localhost /ip address
in the custom list.您可以尝试使用端口 23 或向您的主机提供商询问 ssh 端口。一些主机提供商更改 ssh 端口。
You can try to use port 23 or ask your host provider for the ssh port. Some host providers change the ssh port.
Cygwin 默认情况下不安装 SSH 服务器,但您可以根据需要设置 sshd。但默认情况下,没有任何可通过 ssh 访问的内容。
Cygwin doesn't install an SSH server by default, although you can set up sshd if you want. By default, however, there's nothing to ssh to.
按照此 链接,然后执行
Follow the steps in this link and then do a