ssh processes lingering after scp

From: Susan McConnell (susanm_at_jbpc.co.uk)
Date: 10/05/04

  • Next message: Fiengo, Paul (Contractor): "FW: HELP !!! ssh-askpass... No such file or directory."
    Date: Tue, 5 Oct 2004 10:55:56 +0100
    To: secureshell@securityfocus.com
    
    

    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: Fiengo, Paul (Contractor): "FW: HELP !!! ssh-askpass... No such file or directory."

    Relevant Pages

    • Re: ssh processes lingering after scp
      ... > 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: ... Good judgement comes with experience. ...
      (SSH)
    • Re: Final conversion questions
      ... use the attached perl script (run as ... Use the -r option to scp, and you'll get all files, including. ... > from the OpenBSD site to format, then create my new passwd file for BSD. ...
      (freebsd-isp)
    • Re: scp without any prompts
      ... SH> I have never used SCP before, but I am working on a perl script to ... SH> prompts me for the password for accnt2@host2. ... SH> off password authentication, but I am still being prompted to ...
      (comp.security.ssh)
    • scp without any prompts
      ... I have never used SCP before, but I am working on a perl script to ... accnt2@host2 the scp program prompts me for the passkey, ... password authentication, but I am still being prompted to enter both the ...
      (comp.security.ssh)
    • RE: Error message on install ARGGGG
      ... work I'll fix up the perl script. ... Error message on install ARGGGG ... I've found part of the problem but don't know what to do to fix it, ... unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
      (RedHat)