Re: ssh processes lingering after scp

From: Patrick Lapre (patrick_lapre_at_palletways.com)
Date: 10/06/04

  • Next message: Ed Arnold: "Re: ssh processes lingering after scp"
    Date: Wed, 6 Oct 2004 07:59:56 +0100 (BST)
    To: Susan McConnell <susanm@jbpc.co.uk>
    
    
    

    Sue,

    Have you tried this script on other systems (just to verify it only
    happens on this machine)? When did this occur? What version of SSH and
    Perl are you running?

    Just some questions to shed some light on the problem.

    You could try a workaround like to filter out these processes (using a
    grep) and kill them instead trying of trying to exit a shell and hoping
    the process shuts down.

    Pat

    C.P.J. Lapré
    Implementation & Support-manager

    On Oct 05, 2004 11:55 AM, Susan McConnell <susanm@jbpc.co.uk> wrote:

    > We're copying a number of files, sometimes up to 3-400, using
    > scp called from a perl script. The command issued by the perl script
    > is:
    >
    > my $cmd = "scp $basedir/data/$basename remote.example.com:/tmp";
    > system ($cmd);
    >
    > We're finding that some ssh processes, with a PPID of 1, remain after
    > the
    > script has completed. "ps -ef" shows:
    >
    > UID PID PPID C STIME TTY TIME CMD
    > root 12904 1 0 09:35 pts/0 00:00:00 /usr/bin/ssh -x ...
    > root 12990 1 0 09:36 pts/0 00:00:00 /usr/bin/ssh -x ...
    > root 12995 1 0 09:36 pts/0 00:00:00 /usr/bin/ssh -x ...
    > root 13000 1 0 09:36 pts/0 00:00:00 /usr/bin/ssh -x ...
    > root 13251 1 1 09:37 pts/0 00:00:00 /usr/bin/ssh -x ...
    >
    > The full command shown in each case (removed from above to prevent
    > line
    > wrapping) is:
    >
    > /usr/bin/ssh -x -oFallBackToRsh no remote.example.com scp -t /tmp
    >
    > I've tried "shopt -s huponexit" but that hasn't resolved this. Can
    > anyone
    > shed some light on why this is happening and how we can fix it?
    >
    > Thanks for any help or ideas.
    >
    > Sue
    >

    
    


  • Next message: Ed Arnold: "Re: ssh processes lingering after scp"

    Relevant Pages

    • Re: ssh tunnel
      ... The following script ... I think you're not realising what the -f argument to ssh does. ... Perl can put processes in the background just fine, ... print "opening tunnel ... ...
      (comp.lang.perl.misc)
    • Re: Question on input password on ssh prompt
      ... I am writing a perl script running on the XP, ... However right after I made the system call for ssh, ... Is that a way I can feed it the password without install any ...
      (comp.lang.perl.misc)
    • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
      ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
      (de.comp.lang.perl.cgi)
    • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
      ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
      (de.comp.lang.perl.cgi)
    • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
      ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
      (de.comp.lang.perl.cgi)