我正在尝试通过我的apache web服务器通过HTTP连接到我的SSH服务器,我已经按照指南1和2中的说明进行了操作,隧道连接并在大约1分钟内获得了到我的服务器的SSH连接。
然而,在链中的某处似乎有60秒的超时,因为我在大约60秒后得到了错误Socket read error: [104] Connection reset by peer。当我按照配置运行ssh命令时和单独运行proxytunnel命令时都会发生这种情况。
我尝试通过将ServerAliveInterval更改为30秒并在.ssh/config文件中启用TCPKeepAlive,以及在apache配置中添加一个ProxyTimeout 3600来修复此问题。
ProxyRequests On AllowConnect 22 ProxyTimeout 3600 <Proxy *> Order deny,allow Deny from all </Proxy> <ProxyMatch 127.0.0.1> Order deny,allow Allow from all </ProxyMatch>
谢谢你的帮助。
1
2
编辑:我运行的是Apache2.4
发布于 2016-02-02 15:49:31
由于没有确切的问题,下面是我是如何为我的服务器解决这个问题的(当我想要从世界各地的任何计算机访问它时):
https://wiki.ubuntuusers.de/shellinabox/
' shell -in-a-box‘模拟了一个可以从任何浏览器调用的ssh shell(我测试了chrome和firefox)。
这里有很好的安装教程:
http://www.tecmint.com/shell-in-a-box-a-web-based-ssh-terminal-to-access-remote-linux-servers/
别忘了删除'--localhost-only‘
# if you want to restrict access to shellinaboxd from localhost only
SHELLINABOX_ARGS="--o-beep -s /:SSH:172.16.25.125 --localhost-only"在配置文件中
/etc/default/shellinabox以便能够从您的网络外部访问它。
发布于 2018-06-25 22:55:59
它可以通过在apache配置中使用以下设置来工作
RequestReadTimeout header=0,MinRate=500 body=0,MinRate=500请参阅https://sourceforge.net/p/proxytunnel/mailman/message/33649006/
https://stackoverflow.com/questions/25623686
复制相似问题