Re: ssh processes lingering after scp

From: Ed Arnold (era_at_ucar.edu)
Date: 10/06/04

  • Next message: Ram: "Re: Small SSH"
    Date: Wed, 6 Oct 2004 11:39:25 -0600 (MDT)
    To: Susan McConnell <susanm@jbpc.co.uk>
    
    

    On Tue, 5 Oct 2004, Susan McConnell 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
     
    You didn't say what kind of a system you saw this on. Was it Solaris?

    I saw these exact same symptoms on a solaris-9 box running sun's
    implementation of ssh (SUNWssh*). Since I had set MAXUPRC on that
    system, the leftover processes were causing work to come to a halt.
    But, since the system was copying files to non-sun systems, I figured
    I wouldn't be able to get support from sun on this issue, and I wasn't
    able to firmly determine the cause from sunsolve and google searches.

    I found the problem went away when I removed the sun ssh implementation,
    and installed openssh-3.9p1 to replace it.


  • Next message: Ram: "Re: Small SSH"

    Relevant Pages

    • Re: How Can I use ssh in my perl code
      ... at remote m/c, which we can do with ssh. ... connecting to remote m/c once we execute the perl script through ssh. ... The information contained in this electronic message and any attachments to ...
      (perl.dbi.users)
    • RE: Extracting attachment from mail
      ... to an unix user (solaris): ... > * mails received by this unix user are all stored in the file named ... > * the unix user that run the perl script is also the owner of ... which any mail handler should do about equally well. ...
      (perl.beginners)
    • Re: Any tool for network/bandwidth testing "standard" Solaris 9?
      ... install any software/tools beyond what is normally available in a ... Solaris installation (no compilers available on the system, ... ISTR there are ways to "pipe" data to FTP for a put - you could then ... could in theory write a perl script to connect to one of those three ...
      (comp.unix.solaris)
    • Re: consent to monitoring banner for ssh
      ... the user cannot remove this functionality for future logins, ... logins, but I don't know the best way to proceed for ssh. ... That perl script did things such as ensure that the user had permission to log in to the system, check the user's quota, print out a blurb, then exec'd tcsh. ...
      (RedHat)
    • Re: authentication failure log message
      ... > I've been working on a Perl script ... This happens when ssh has no controlling terminal or can't open /dev/tty ... using the "Expect" perl module to provide a controlling tty, ... Good judgement comes with experience. ...
      (SSH)