PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.security.ssh > Use of ClientAliveInterval and ClientAliveCountMax to terminate sftp
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.security.ssh SSH secure remote login and tunneling tools.

Use of ClientAliveInterval and ClientAliveCountMax to terminate sftp

Réponse
 
LinkBack Outils de la discussion
Vieux 02/11/2006, 16h11   #1
shyam
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Use of ClientAliveInterval and ClientAliveCountMax to terminate sftp

Does ClientAliveInterval and ClientAliveCountMax hold good for
terminating sftp session in case of no dataflow in a SSH channel?

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.

Is there a way to cut short this time.

I am using Openssh 3.6 on RH Linux AS 3.0 kernel 2.4

thanks

  Réponse avec citation
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
Vieux 03/11/2006, 02h43   #3
shyam
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Use of ClientAliveInterval and ClientAliveCountMax to terminate sftp


Per Hedeland wrote:
> 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...
>


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@hedeland.org


  Réponse avec citation
Vieux 03/11/2006, 15h23   #4
shyam
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 will be appreciated

thanks

shyam wrote:
> Per Hedeland wrote:
> > 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...
> >

>
> 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@hedeland.org


  Réponse avec citation
Vieux 26/11/2006, 12h56   #5
Darren Tucker
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Use of ClientAliveInterval and ClientAliveCountMax to terminate sftp

On 2006-11-02, shyam <shyam.geek@gmail.com> wrote:
> Does ClientAliveInterval and ClientAliveCountMax hold good for
> terminating sftp session in case of no dataflow in a SSH channel?
>
> 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 ?


No, what those do is send a packet to the client if they have seen one for
a while, but if the client is still running then it will reply and reset
the timer without any interaction from the user.

Basically they if the client crashes, is killed, rebooted or
drops off the net, but not if the client is simply idle but otherwise
ok.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h25.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12268 seconds with 13 queries