From: Kenny McCormack on
I have an ssh connection that times out on inactivity. I want to put
something in the connection to generate a bit of "noise" on the
connection every so often. I seem to remember having done this in the past
but don't remember how I did it. Can someone help?

Notes:
1) Don't bother telling me I shouldn't do this. That will be sent to /dev/null.
2) I did "man ssh" and "man ssh_config" searching for the word "keep" -
and found a few hits ("ServerAliveCountMax", "TCPKeepAlive",
"ServerAliveInterval", etc), but none of these seem right. In
particular, these options all seem to default to "on" or "yes", yet
the problem still obtains.
3) I'm pretty sure there is (or was) some option that you set to a
numeric value (e.g., 60), that caused it to send something across
every X seconds (e.g., every 60 seconds).

--
> No, I haven't, that's why I'm asking questions. If you won't help me,
> why don't you just go find your lost manhood elsewhere.

CLC in a nutshell.

From: pk on
Kenny McCormack wrote:

> I have an ssh connection that times out on inactivity. I want to put
> something in the connection to generate a bit of "noise" on the
> connection every so often. I seem to remember having done this in the
> past
> but don't remember how I did it. Can someone help?
>
> Notes:
> 1) Don't bother telling me I shouldn't do this. That will be sent to
> /dev/null.

Why do you think people have it in for you? (SCNR)

> 2) I did "man ssh" and "man ssh_config" searching for the word
> "keep" -
> and found a few hits ("ServerAliveCountMax", "TCPKeepAlive",
> "ServerAliveInterval", etc), but none of these seem right. In
> particular, these options all seem to default to "on" or "yes", yet
> the problem still obtains.

ServerAliveInterval
Sets a timeout interval in seconds after which if no data has
been received from the server, ssh(1) will send a message
through the encrypted channel to request a response from the
server. The default is 0, indicating that these messages will
not be sent to the server. This option applies to protocol
version 2 only.

Doesn't seem to be on by default.

> 3) I'm pretty sure there is (or was) some option that you set to a
> numeric value (e.g., 60), that caused it to send something across
> every X seconds (e.g., every 60 seconds).

I used to set the above option to 30 seconds. The actual value you use
depends on how long it takes to your firewall to shut down an inactive
session.

You may also want to set ClientAliveInterval on the server, if possible.

Please also note that, while using ServerAliveInterval made things much
better for me, I still had (and have) cases of idle SSH sessions dying
despite the keepalive.
From: Owen on
On May 24, 6:52 am, gaze...(a)shell.xmission.com (Kenny McCormack)
wrote:
> I have an ssh connection that times out on inactivity.  I want to put
> something in the connection to generate a bit of "noise" on the
> connection every so often.  I seem to remember having done this in the past
> but don't remember how I did it.  Can someone help?
>
> Notes:
> 1) Don't bother telling me I shouldn't do this.  That will be sent to /dev/null.
> 2) I did "man ssh" and "man ssh_config" searching for the word "keep" -
>     and found a few hits ("ServerAliveCountMax", "TCPKeepAlive",
>     "ServerAliveInterval", etc), but none of these seem right.  In
>     particular, these options all seem to default to "on" or "yes", yet
>     the problem still obtains.
> 3) I'm pretty sure there is (or was) some option that you set to a
>     numeric value (e.g., 60), that caused it to send something across
>     every X seconds (e.g., every 60 seconds).
>
> --
>
> > No, I haven't, that's why I'm asking questions. If you won't help me,
> > why don't you just go find your lost manhood elsewhere.
>
> CLC in a nutshell.




In /etc/ssh/ssh_config, I have added the line

ServerAliveInterval 120





Owen
From: Kenny McCormack on
In article <18a3380b-6d62-4301-96b2-a7a0e07ac458(a)y18g2000prn.googlegroups.com>,
Owen <xemoth(a)gmail.com> wrote:
....
>In /etc/ssh/ssh_config, I have added the line
>
> ServerAliveInterval 120

We have a winner! Thanks.

You have to admit that the docs are unclear - seems like there are lots
of options (to read through) to get at one simple concept.

Anyway, as I said, I knew I had figured this out before, but this time
it wasn't so obvious (to me, anyway).

--
(This discussion group is about C, ...)

Wrong. It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch [sic] revelations of the childhood
traumas of the participants...