2

I'm a user on a system, and I want to know if that system is running sshd with a ClientAliveInterval > 0, which would tell me if I need to worry about using ServerAliveInterval locally or not. I can't read /etc/ssh/sshd_config, but is there a way to query sshd or something similar?

1 Answer 1

3

Look at my question. This is related to yours. So the answer is: Drop the link and look if the process on the server and client side dies.

You can also watch your connection with tcpdump -i $INTERFACE port ssh I think it even decodes "ssh-keepalive" if it is active.

The default is "not active".

4
  • I feel like just looking for process death could be problematic, as if you won't really be able to tell the difference between sshd just dying (CAI == 0) and a small ClientAliveInterval. However, the tcpdump tip worked pretty well, as of 4.1.1 it didn't seem to decode ssh-keepalive, but the regular pulse of packets every 30 seconds pretty well answered my question.
    – brc
    Mar 18, 2012 at 4:42
  • 30 seconds might be TCP-keepalive as well. I do not know if it was here or on Server Fault - but I darkly remember that tcp-keepalive is something along 30 or 60 seconds (per OS default in Linux).
    – Nils
    Mar 18, 2012 at 20:10
  • I might be wrong, but the TCP-keepalive packets wouldn't have encrypted payloads? The ones I was seeing were, so I assumed it was SSH.
    – brc
    Mar 19, 2012 at 16:28
  • Ok - then that should be clear.
    – Nils
    Mar 19, 2012 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .