SSH Timeout Notification - SSH

This is a discussion on SSH Timeout Notification - SSH ; Hi, I'm writing a program that would like to be notified when a timeout occurs in the SSH connection. How do I achieve this ? --Sumedha...

+ Reply to Thread
Results 1 to 5 of 5

Thread: SSH Timeout Notification

  1. SSH Timeout Notification

    Hi,
    I'm writing a program that would like to be notified when a timeout
    occurs in the SSH connection. How do I achieve this ?

    --Sumedha


  2. Re: SSH Timeout Notification


    wrote in message
    news:1139460233.684711.174960@f14g2000cwb.googlegr oups.com...
    > Hi,
    > I'm writing a program that would like to be notified when a timeout
    > occurs in the SSH connection. How do I achieve this ?
    >
    > --Sumedha
    >


    in the sshd_config:

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



  3. Re: SSH Timeout Notification


    > Hi,
    > I'm writing a program that would like to be notified when a timeout
    > occurs in the SSH connection. How do I achieve this ?


    The disconnect message in the SSH tranport protocol defines a number of
    "reason codes," but none of them indicate a timeout. There is also a
    message string you could examine for the word "timeout," but that's hardly
    reliable.

    Not all SSH servers even have an idle timeout feature; for instance Tectia
    (ssh.com) does, but OpenSSH does not. Most often when people see SSH
    connections "time out," some intervening firewall or NAT device is
    actually the culprit.

    --
    Richard Silverman
    res@qoxp.net


  4. Re: SSH Timeout Notification

    Thanks.
    But how would MY program know that the timeout has occured ?


  5. Re: SSH Timeout Notification

    >>>>> "MB" == Michael Berdey writes:

    MB> wrote in message
    MB> news:1139460233.684711.174960@f14g2000cwb.googlegr oups.com...
    >> Hi, I'm writing a program that would like to be notified when a
    >> timeout occurs in the SSH connection. How do I achieve this ?
    >>
    >> --Sumedha
    >>


    MB> in the sshd_config:

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

    This depends on what the poster means by "timeout."

    An "idle timeout" feature disconnects a client if the connection remains
    up but the client sends no data -- i.e. the connection is idle.
    ClientAliveInterval simply ensures that the SSH connection remains up; it
    will never disconnect a client simply for sending no user data.

    I assume he means idle timeout, because he talks about "detecting it." If
    the connection were torn down by the server because of lack of
    protocol-level response (i.e. ClientAliveInterval), by definition the
    client is not in a position to observe this.

    --
    Richard Silverman
    res@qoxp.net


+ Reply to Thread