首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SSH隧道“通道x:打开失败:连接失败:连接超时”

SSH隧道“通道x:打开失败:连接失败:连接超时”
EN

Unix & Linux用户
提问于 2016-06-19 09:13:49
回答 1查看 12.5K关注 0票数 3

我在谷歌上搜索了很多地方,寻找解决这个问题的方法;然而,我得到的最好的答案是“什么都做不了。”当然,这是令人不满意的,所以这里说:

我已经在家里设置了一个SSH守护进程,我想要将它导入SSH隧道。SSH的工作没有问题。隧道似乎也没有问题。本地执行的命令是..。

代码语言:javascript
复制
~$ ssh root@xxx.yyy.zzz.aaa -p 53256 -D11323

家里的东西有一个路由器,它将端口53256端口转发到我的ssh服务器,端口22。一切都连接得很好,隧道表面上也很正常。在机器上,我为127.0.0.1:11323放置了一个SOCKS代理,我可以很好地访问站点。然而,当访问特定的网站,如ubuntuforums.org或fedoraforums.org,连接挂起相当多。然后,带有ssh命令的shell将显示标题中的错误,而连接就会失败。阅读之后,我得到的最接近的答案是,“服务器负载或配置不当”存在问题。然而,让我感到困惑的是,我绝对无法通过隧道连接到这些网站。尽管如此,有谁能提供一个解决方案呢?

编辑:这是在失败之前启用SSH的-vv选项的输出:

代码语言:javascript
复制
debug1: Connection to port 11323 forwarding to socks port 0 requested.
debug2: fd 11 setting TCP_NODELAY
debug2: fd 11 setting O_NONBLOCK
debug1: channel 5: new [dynamic-tcpip]
debug2: channel 5: pre_dynamic: have 0
debug2: channel 5: pre_dynamic: have 3
debug2: channel 5: decode socks5
debug2: channel 5: socks5 auth done
debug2: channel 5: pre_dynamic: need more
debug2: channel 5: pre_dynamic: have 0
debug2: channel 5: pre_dynamic: have 23
debug2: channel 5: decode socks5
debug2: channel 5: socks5 post auth
debug2: channel 5: dynamic request: socks5 host ubuntuforums.com port 80 command 1
debug1: Connection to port 11323 forwarding to socks port 0 requested.
debug2: fd 12 setting TCP_NODELAY
debug2: fd 12 setting O_NONBLOCK
debug1: channel 6: new [dynamic-tcpip]
debug2: channel 6: pre_dynamic: have 0
debug2: channel 6: pre_dynamic: have 3
debug2: channel 6: decode socks5
debug2: channel 6: socks5 auth done
debug2: channel 6: pre_dynamic: need more
debug2: channel 6: pre_dynamic: have 0
debug2: channel 6: pre_dynamic: have 23
debug2: channel 6: decode socks5
debug2: channel 6: socks5 post auth
debug2: channel 6: dynamic request: socks5 host ubuntuforums.com port 80 command 1
channel 5: open failed: connect failed: Connection timed out
debug2: channel 5: zombie
debug2: channel 5: garbage collecting
debug1: channel 5: free: direct-tcpip: listening port 11323 for ubuntuforums.com port 80, connect from ::1 port 56088 to ::1 port 11323, nchannels 7
channel 6: open failed: connect failed: Connection timed out
debug2: channel 6: zombie
debug2: channel 6: garbage collecting
debug1: channel 6: free: direct-tcpip: listening port 11323 for   ubuntuforums.com port 80, connect from ::1 port 56090 to ::1 port 11323, nchannels 6
EN

回答 1

Unix & Linux用户

发布于 2016-06-23 12:57:09

我是个笨蛋。我在服务器上设置了一些古怪的iptable规则。清除了所有这些之后,一切都很好。抱歉打扰你了。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/290697

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档