Re: Use of ClientAliveInterval and ClientAliveCountMax to terminate sftp



I upgraded to openssh4.3 version from www.openssh.org

With it using ServerAliveINterval & ServerAliveCountMax still dosnt
yeild the desired results I wanted

Any help will be appreciated

thanks

shyam wrote:
Per Hedeland wrote:
In article <1162483891.790772.213920@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
"shyam" <shyam.geek@xxxxxxxxx> writes:
Does ClientAliveInterval and ClientAliveCountMax hold good for
terminating sftp session in case of no dataflow in a SSH channel?

Yes.

What I am looking for is a mechanism by which I can terminate a sftp
session, if there is no data transfer to the server ?

I tried by setting ClientAliveInterval and ClientAliveCountMax to some
small values and disconnecting network cables right after the
connecting establishment. But the sftp does not terminate for a long
long time.

The ClientAlive mechanism is a server-side thing - the server sends
messages and expects responses, if it doesn't get them it will terminate
the session. But of course, if you have disconnected the cable, there's
no way the sftp client program can notice this - it's timeout will be
entirely controlled by the TCP parameters on the client host. The
defaults for those vary by OS and they may or may not be settable,
though generally if there is no attempt to send data the timeout is
infinite.

If you want a mechanism within OpenSSH to allow the client to notice
loss of connectivity to the server, you should thus look at the
ServerAlive* settings on the client side...


I think ServerAlive setting is now available in openssh3.6
It Might be there in commercial ssh packages , I am not sure
Is there any other way?



--Per Hedeland
per@xxxxxxxxxxxx

.



Relevant Pages

  • Re: SSL/TLS & renegotiation and Internet Explorer
    ... When IE closes the connection with the server and prompts the user to choose ... recovery logic the SSL session is discarded. ... If the user only has one suitable client certificate, ...
    (microsoft.public.security)
  • Re: RDP Printing by station
    ... flagged as non-printing stations can not print for ANY users. ... multiple NIC's on the terminal server. ... I'd then just have to ensure that the client stations that are ... session is limited to NIC # 1. ...
    (microsoft.public.windows.terminal_services)
  • using java with sftp
    ... JCraft JSch package to SFTP files. ... //First Create a JSch session ... System.err.println("Unable to connect to FTP server. ...
    (comp.lang.java.programmer)
  • Re: using java with sftp
    ... JCraft JSch package to SFTP files. ... //First Create a JSch session ... System.err.println("Unable to connect to FTP server. ...
    (comp.lang.java.programmer)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)