Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The title pretty much says it all, 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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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

share|improve this answer
    
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 '12 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 '12 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 '12 at 16:28
    
Ok - then that should be clear. –  Nils Mar 19 '12 at 21:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.