【问题标题】:curl: (52) Empty reply from server via ssh port forwardingcurl: (52) 来自服务器的空回复通过 ssh 端口转发
【发布时间】:2021-08-03 16:33:06
【问题描述】:

我的家用 PC 上运行着一个 chrome 远程调试服务器,我想从我的公共服务器访问它。

我已经创建了从服务器到我的家用电脑的反向 ssh 隧道。 我做了 ssh 端口转发如下​​:

ssh  -L 9222:localhost:9222 user@localhost -p <SSH_PORT> -N 

现在,当我在公共服务器上运行 curl 时,它会给出空响应

$ curl http://localhost:9222 -v
* Rebuilt URL to: http://localhost:9222/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9222 (#0)
> GET / HTTP/1.1
> Host: localhost:9222
> User-Agent: curl/7.61.1
> Accept: */*
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server

如何解决?

【问题讨论】:

    标签: curl portforwarding ssh-tunnel


    【解决方案1】:

    sshd 服务器无法从 chrome 服务器读取,因为套接字在打开时出错。

    我遇到的问题是 https://github.com/PowerShell/Win32-OpenSSH/issues/414 与 https://github.com/PowerShell/Win32-OpenSSH/issues/244#issuecomment-239071490 作为修复.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-11-05
      • 1970-01-01
      • 1970-01-01
      • 2021-05-07
      • 2015-05-05
      • 2010-12-27
      • 1970-01-01
      相关资源
      最近更新 更多