My server is behind a firewall that exposes only port 22. I frequently use SSH local port forwarding to access several HTTP services running on the server. It works, but not always. Now and then I get an error message
packet_write_wait: Connection to XXX.XXX.XXX.XXX port 22: Broken pipe and I have to restart the SSH connection for it to work again.
ServerAliveInterval set to 30 in my config file. In addition, I often open multiple independent ssh processes with different ports forwarded. When one is broken, others work still, so I would think that the network connection itself should be normal.
If it is of any use, my client is on macOS High Sierra, and the server is running Ubuntu 16.04.
What could be the cause of the issue? What potential solutions could I have?