SSH not closing after script exit
From: Arnoud Smit (lagoonNOSPAM@xs4all.nl)Date: 03/28/02
- Next message: Martin Petruzzi: "Re: ssh 1.2.1 Root compromise"
- Previous message: RainbowHat: "Re: unexpected ICMP host unreachable - no worries?"
- Next in thread: Jens Hektor: "Re: SSH not closing after script exit"
- Reply: Jens Hektor: "Re: SSH not closing after script exit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Arnoud Smit <lagoonNOSPAM@xs4all.nl> Date: Thu, 28 Mar 2002 12:46:07 GMT
Got the following over here.. really bugs us..
We've got some remote machines to administer, so we have a SSH to a
remote server, over which we connect to the machine to administer. We
created a script which takes care of the SSH connection; works fine.. On
the remote server we start a script which does a 'sleep 10' after which
the script exits, which works fine 2 offcourse. Now for the tricky
stuff..
When we start the local script, the one which creates the SSH, with an
'&' (to be able to have all the commands in one go..) the connection is
established over SSH, but never closes.. Even if the script on the other
side does an exit..
Weird..
Our assumption is that the fork to the new shell (&) starts the script,
which starts the SSH (still following me?), which exits after the SSH
gets active (new shell?). Thus, is the SSH a new shell and is the forked
shell exited? This might explain why the SSH connection to the remote
server stays open while there are no processes running on either site
using the SSH.
When we don't use the & in the initial shell, the problem doesn't occur..
Bizarre...
Any hints, tips etc welcome..
Arnoud
Open-Challenge
- Next message: Martin Petruzzi: "Re: ssh 1.2.1 Root compromise"
- Previous message: RainbowHat: "Re: unexpected ICMP host unreachable - no worries?"
- Next in thread: Jens Hektor: "Re: SSH not closing after script exit"
- Reply: Jens Hektor: "Re: SSH not closing after script exit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|