端口 22 的 cygwin 连接被拒绝

发布于 2025-01-03 07:56:14 字数 150 浏览 4 评论 0原文

我已经在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

等数载,海棠开 2025-01-10 07:56:14

我遇到了同样的问题,但我在 CYGWIN 命令行上运行了它并且它起作用了:

 ~ : net start sshd

之后我执行了命令 ssh -v localhost 并且错误消息没有显示。希望这有帮助!

I faced the same problem but I ran this on the CYGWIN command line and it worked :

 ~ : net start sshd

After that I executed the command ssh -v localhost and the error message didn't show up. Hope that this helps !.

美羊羊 2025-01-10 07:56:14

如果您在 Windows XP 中遇到此问题,请按照以下步骤打开 ssh 端口:

  1. 转至控制面板中安全部分的 Windows 防火墙
  2. 例外 -> 添加端口
  3. 将端口名称指定为 ssh,编号指定为 22。
  4. 选择选项 TCP
  5. 单击“确定”

这将帮助您从 cygwin 打开 ssh

对于 Windows 上的 hadoop 等本地应用程序开发,请更改自定义列表中的范围 localhost /ip 地址

If you are facing this problem in Windows XP follow these steps to open port for ssh:

  1. Go to windows firewall of security section in control panel
  2. Exceptions->add port
  3. Give port name as ssh and number as 22.
  4. Select option TCP
  5. Click on Ok

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.

青春如此纠结 2025-01-10 07:56:14

您可以尝试使用端口 23 或向您的主机提供商询问 ssh 端口。一些主机提供商更改 ssh 端口。

ssh [email protected] -p 23

You can try to use port 23 or ask your host provider for the ssh port. Some host providers change the ssh port.

ssh [email protected] -p 23
×眷恋的温暖 2025-01-10 07:56:14

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.

有木有妳兜一样 2025-01-10 07:56:14

按照此 链接,然后执行

 $~ net start sshd    
 $~ ssh localhost

Follow the steps in this link and then do a

 $~ net start sshd    
 $~ ssh localhost
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文