Afficher un message
Vieux 02/11/2006, 21h37   #2
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Use of ClientAliveInterval and ClientAliveCountMax to terminate sftp

In article <1162483891.790772.213920@e3g2000cwe.googlegroups. com>
"shyam" <shyam.geek@gmail.com> 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...

--Per Hedeland
per@hedeland.org
  Réponse avec citation
 
Page generated in 0,06352 seconds with 9 queries