Archive > 19.7 Legacy Series

SSH disconnect after 10-15 minutes

(1/1)

shecki:
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

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


Cheers,
Franco

fabian:
I guess more that it is a NAT device.

firewall:

--- 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?

--- End quote ---

/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.

shecki:
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

Navigation

[0] Message Index

Go to full version