SSh-agent not dying after vnc viewer exit/logoff/logout/disconnect

S. I. Becker stewart "at" sibecker.co.uk
Wed Feb 1 15:54:03 2006


Joe,

I've been assuming that you are running the VNC session through an ssh 
encrypted tunnel, and that ssh-agent on the _viewer_ machine that you are 
using to store your passwords isn't closing properly (although thinking a 
bit harder, you wouldn't want it to close on the viewer machine until you 
log off there).  If it's ssh-agent on the on the _server_ that is causing a 
problem, then it may be because X is starting ssh-agent when it starts, but 
not closing it when it exits.  In that case, you need to check your scripts 
that run when X closes.

Stewart
----- Original Message ----- 
From: "Financial Systems & Economic Analytics" <financial.seal "at" cox.net>
To: "S. I. Becker" <nutmeg "at" cantab.net>
Cc: <vnc-list "at" realvnc.com>
Sent: Wednesday, February 01, 2006 3:00 PM
Subject: Re: SSh-agent not dying after vnc viewer 
exit/logoff/logout/disconnect


> On my system, I am using xinetd following the vnc mail list example.
>
> So,
> When is the ssh getting call when a vnc session starts?
>
> How to I set up a script or set the ssh session to die after a short
> time (say 60 secs)?
>
>
> Thank you
> Joe
>
>
> S. I. Becker wrote:
>>
>>
>>> Stewart,
>>>
>>> Ssh clients hold the connection open so long as there is something
>>> using it,
>>> in this case a forwarded port.  There's no way that the client could
>>> exit
>>> without causing the forwarded port to close, too.
>>>
>>
>> James,
>>
>> That's the point!  You initiate the ssh session, with a shell/script
>> that will just exit after, say, 60 seconds.  In the mean time you set
>> up the tunnelled VNC session.  The ssh session exits when the time is
>> up, but is held open by the open tunnelled port(s).  Then when you do
>> close the VNC session, the ssh session closes too because there is now
>> nothing to keep it open, which is what I thought was wanted.
>>
>> Stewart
>>
>>
>
> -- 
>


--------------------------------------------------------------------------------


> On my system, I am using xinetd following the vnc mail list example.
>
> So,
> When is the ssh getting call when a vnc session starts?
>
> How to I set up a script or set the ssh session to die after a short time 
> (say 60 secs)?
>
>
> Thank you
> Joe
>
>
> S. I. Becker wrote:
>
>
>
>    Stewart,
>
>    Ssh clients hold the connection open so long as there is something 
> using it,
>    in this case a forwarded port.  There's no way that the client could 
> exit
>    without causing the forwarded port to close, too.
>
>
>
>  James,
>
>  That's the point!  You initiate the ssh session, with a shell/script that 
> will just exit after, say, 60 seconds.  In the mean time you set up the 
> tunnelled VNC session.  The ssh session exits when the time is up, but is 
> held open by the open tunnelled port(s).  Then when you do close the VNC 
> session, the ssh session closes too because there is now nothing to keep 
> it open, which is what I thought was wanted.
>
>  Stewart
>
>
>
>
>
> --