ClientAliveInterval

Sayan Chaliha sayan.chaliha at webyog.com
Tue Mar 2 01:58:58 EST 2010


@Damien:

Yes, well, I understand that. But I am experiencing some weird behavior with
libssh... So I was wondering whether it had anything to do with not replying
to keepalive at openssh.com

Here's what I'm experiencing:
-- When the app gets disconnected from the OpenSSH 4.3 server, it tries to
reconnect.
-- Reconnection and authorization are successful, but libssh fails when
trying to open a new channel (with some obscure 'unrecognized packet'
message).
-- This continues until the ClientAliveInterval has expired.

Anyway, thanks for all the help. I'm now sure that the problem in not with
my application but rather with libssh. I've gotten in touch with them (ie,
the developers of libssh) to have this issue solved.

Thanks again for your time!

On Sat, Feb 27, 2010 at 5:59 AM, Damien Miller <djm at mindrot.org> wrote:

> On Fri, 26 Feb 2010, Sayan Chaliha wrote:
>
> > @Damien, could you also tell me what would happen if the client didn't
> > respond to that request, and instead tried to create new session and
> channel
> > afresh? Would the server send the same message again?
>
> A client that is compliant with the protocol _must_ respond, even just to
> say "I have no idea what this command is". Any response will reset the
> keepalive timer.
>
> > On Fri, Feb 26, 2010 at 12:40 PM, Damien Miller <djm at mindrot.org> wrote:
> >
> > > On Fri, 26 Feb 2010, Sayan Chaliha wrote:
> > >
> > > > Hi,
> > > >
> > > > I am having some trouble with the ClientAliveInterval server setting.
> My
> > > > (C++) application fails to start an SSH channel to an OpensSSH server
> > > within
> > > > this time-out period if it doesn't reply correctly to this
> 'keep-alive'
> > > > no-op that is sent by the server. How is this no-op handled? I am
> using
> > > the
> > > > libssh client library, and I could find no references on how to
> handle
> > > this.
> > >
> > > Client aliver interval is implemented by sending a global or channel
> > > request of type "keepalive at openssh.com" with want-reply turned on.
> > > You shouldn't need to implement anything for this to work - a client
> > > should return SSH2_MSG_REQUEST_FAILURE if it doesn't implement this
> request
> > > type and that should be enough to reset the keepalive watchdog timer.
> > >
> > > If you would like to explicitly support it, you can just send an
> > > approprate SSH2_MSG_REQUEST_SUCCESS (global request) or
> > > SSH2_MSG_CHANNEL_SUCCESS (channel request) message, but this is purely
> > > optional.
> > >
> > > -d
> > >
> >
> >
> >
> > --
> > Regards,
> > Sayan Chaliha
> > Webyog Softworks Private Limited
> > 2nd Floor, Novel Team Building
> > #10, 100 Feet Ring Road
> > BTM Layout 1st Stage
> > Bangalore - 560068
> >
> > +91-9743357501
> > _______________________________________________
> > openssh-unix-dev mailing list
> > openssh-unix-dev at mindrot.org
> > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
> >
>



-- 
Regards,
Sayan Chaliha
Webyog Softworks Private Limited
2nd Floor, Novel Team Building
#10, 100 Feet Ring Road
BTM Layout 1st Stage
Bangalore - 560068

+91-9743357501


More information about the openssh-unix-dev mailing list