I try to connect to my SSH server via HTTP through my apache web server, I followed the instructions in manuals such as [1] and [2], the tunnel connects and within ~ 1 minute I get an SSH connection to my server.
However, it looks like there are 60 seconds in the chain, because I get a Socket read error: [104] Connection reset by peer after about 60 seconds. This happens when I run the ssh command as configured, and when I run the proxytunnel command in isolation.
I tried to fix this problem by changing ServerAliveInterval for 30 seconds and including TCPKeepAlive in the .ssh/config file, and putting ProxyTimeout 3600 in the apache configuration that I included below.
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>
Thanks for any help.
[1] http://dag.wiee.rs/howto/ssh-http-tunneling/
[2] http://blog.cppse.nl/apache-proxytunnel-ssh-tunnel
edit: I am running Apache 2.4
source share