SSH disconnect after 10-15 minutes

Started by shecki, October 31, 2019, 02:52:40 PM

Previous topic - Next topic
When connecting to a opnsense box via SSH the connection is closed after 10-15 minutes, even while working on something. So this has nothing to do with idle.

On another opnsense box (same hardware) this is no issue and SSH stays open for hours.

So I guess there is sime config to set to get rid of the SSH disconnects, but I don't find them. Any hints where to search?

Thanks

It's probably another "smart" firewall somewhere in the network. SSH sessions do not drop normally.


Cheers,
Franco
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT


Quote from: shecki on October 31, 2019, 02:52:40 PM
So I guess there is sime config to set to get rid of the SSH disconnects, but I don't find them. Any hints where to search?

/usr/local/etc/ssh/sshd_config (by way of /usr/local/etc/inc/plugins.inc.d/openssh.inc )

SSH sessions do drop normally if the client does not respond to server ClientAlive requests.  Seems more likely that your client is not configured properly for keepalive...check settings in Putty, ~/.ssh/config, etc.

Checked the sshd_config (why is this not in /etc/ssh ...) and it's the same as the firewall, that does not kick me out. Still thanks for pointing me towards it.

To be clear: This is NOT about idle, that would be understandable. I also get kicked out while doing something on the shell and that's always after 10-15 minutes.

Setup is HA with master slave, master works fine and SSH session still open after the weekend and more than 3 days idle, slave kicks me out after 10-15 minutes.

Doing ssh -vvv:
...
debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: send packet: type 1
packet_write_wait: Connection to <ip> port 22: Broken pipe