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. I'll be really grateful if you guys help me out with this! -- 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
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
Thanks Damien! This is just what I needed... So, I can login to sshd, and execute the command sshd -T and parse the result.. Right? On Fri, Mar 5, 2010 at 11:33 AM, Damien Miller <djm at mindrot.org> wrote:> On Fri, 5 Mar 2010, Sayan Chaliha wrote: > > > Hey guys, > > > > I have one more question: Is it possible to query sshd for settings and > > parameters it was configured with? Something like executing SHOW GLOBAL > > VARIABLES on mysqld, perhaps? > > There is "sshd -T" that will print the current configuration, but it does > not include compile-time settings. > > -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
Sayan Chaliha wrote:> This is just what I needed... So, I can login to sshd, and execute > the command sshd -T and parse the result.. Right?Just be prepared that the sshd you run with -T may be different from the sshd you logged in to. //Peter
On Mar 5, 2010, at 1:26 PM, Peter Stuge wrote:> Sayan Chaliha wrote: >> This is just what I needed... So, I can login to sshd, and execute >> the command sshd -T and parse the result.. Right? > > Just be prepared that the sshd you run with -T may be different from > the sshd you logged in to.Or almost as likely they defined sshd -f /path/to/file.conf in which may be different than the default config file than what sshd is compiled with. - Ben