I have a Debian 11.4 server running on a LAN behind a pfSense firewall. I'm using OpenVPN to connect to the firewall and open a tunnel on my server side LAN and connect to the server.
All fine, ssh goes very well and connects. But the connection does not last very much, as when I start doing things after some dozen keys pressed I get the following message:
client_loop: send disconnect: Broken pipe
If I keep the connection opened for minutes, it is still there.
My ssh config file:
$ cat ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed23449
ServerAliveInterval 30
ServerAliveCountMax 120
TCPKeepAlive no
I'm not being able to use the servers as after the first commands the connection is dropped.
No ideas of what's going on or how to solve. I'm using MacOS terminal on my side, Monterrey version 12.4