5

Hello community for several days I am having problems to keep connected to a ssh tunnel that I perform to a VPS. After 2 to 4 minutes, I get this error: Tunnel closed. packet_write_wait: Connection to UNKNOWN port 0: Broken pipe. I have been reading in forums but I still can not find a solution, these are my configuration files. It is worth mentioning that I access the internet through a proxy (Squid).

On my SSH server (/etc/ssh/sshd_config) add this lines:

ClientAliveInterval 60
ClientAliveCountMax 5
TCPKeepAlive no

On my SSH client (~/.ssh/config):

Host myhost
    User root
    ProxyCommand proxytunnel -p proxy.example.com:3128 -P userproxy:passwordproxy -d dominiovps.com:443 -v -H "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Win32)" 
    ServerAliveInterval 60
    ServerAliveCountMax 5
    TCPKeepAlive no
  • looks like a problem somewhere on the way, closing you the connections. Setting TCPKeepAlive yes is worth trying. – Jakuje Nov 20 '16 at 8:19
  • I have configured TCPKeepAlive yes it on the server and on the client but it still keeps disconnecting me. – Frank Corona Nov 20 '16 at 13:13
2

Try to decrease ServerAliveInterval to 15 or 20: looks like your proxy server is configured for timeout lower than 60 and closes your connection after some idle interval.

| improve this answer | |
  • 2
    I have configured ServerAliveInterval to 20, 15 and 10 it on the server and on the client but it still keeps disconnecting me. – Frank Corona Nov 20 '16 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.