atstake atstake wrote:
I am using ssh (OpenSSH_4.4, OpenSSL 0.9.7j) on OpenBSD4.0. I want
idle user sessions to timeout after a certain period. I tried
ClientAliveInterval 15 and ClientAliveCountMax 3 in
/etc/ssh/sshd_config & restarted sshd which, according to
sshd_config(5) should end the idle user session in 45 seconds. Anyhow,
that's not working and I was wondering
if there's any other way to end/timeout idle users' ssh session. My
shell is bash.

I don't want to use idled or TCPKeepAlive if I can help it.
I don't think the Client Alive mechanism works as you expect. If you were to watch the wire, using tcpdump, you would see sshd send a packet to ssh client every 15 seconds, and, the ssh client will respond saying, "our connection is good and I'm still here so don't terminate our connection." This will happen regardless of whether there is activity in the shell. If a physical disconnect were to occur between the client and server, then the server would close it's connection with the unresponsive client after three 15 second intervals.

You could use the equivalent of ksh's TMOUT environment variable in bash. I don't know bash so I can't be more specific.

-pachl

Reply via email to