RE: Dead SSH Connections from script

From: Richard Hobbs (richard.hobbs_at_crl.toshiba.co.uk)
Date: 07/20/04

  • Next message: Snehangshu Karmakar: "Voice Auth"
    To: "'General Red Hat Linux discussion list'" <redhat-list@redhat.com>
    Date: Tue, 20 Jul 2004 10:48:34 +0100
    
    

    > -----Original Message-----
    > From: redhat-list-bounces@redhat.com
    > [mailto:redhat-list-bounces@redhat.com] On Behalf Of Pete Nesbitt
    > Sent: 20 July 2004 02:26
    > To: General Red Hat Linux discussion list
    > Subject: Re: Dead SSH Connections from script
    >
    > On July 19, 2004 09:26 am, Richard Hobbs wrote:
    > > Hello,
    > >
    > > This script is causing problems... for some reason it keeps leaving
    > > dead SSH connections around, which actually caused the
    > server to run
    > > out of file handles, reporting (too many open files).
    > >
    > > Is there something wrong with the script??
    > >
    > > Thanks in advance to anyone who can help, here's the script:
    > >
    > >
    > ======================================================================
    > > #!/bin/csh -f
    > >
    > > set NPARAMS = 1
    > > if ($#argv != $NPARAMS) then
    > > echo "Usage: $0 <list of automount hosts>"
    > > exit 1
    > > endif
    > > set HOSTLIST = $1
    > > shift
    > > set P1 = $1
    > > set P2 = $2
    > >
    > > set FILENAME=/project2/remote/automountresults`date
    > > "+%Y%m%d%H%M%S"`.txt echo Automount auto.rmt results > $FILENAME
    > > foreach host (`cat $HOSTLIST`)
    > > echo $host
    > > echo $host >> $FILENAME
    > > /usr/bin/scp /project2/remote/auto.rmt $host":/tmp/"
    > > /usr/bin/scp /project2/remote/automountconfig $host":/tmp/"
    > > /usr/bin/ssh root@$host /tmp/automountconfig >>
    > $FILENAME end
    > >
    > ======================================================================
    > >
    > > Thanks,
    > > Hobbs.
    >
    > Hi,
    > I am not too familiar with csh, but it appears to be fine.
    > Are you using a key based authentication that works for the
    > user that the script runs under? You could test by trying the
    > scp line from the command line.
    > How is roots password provided (or is it key?) Is root
    > allowed to access the remote systems via ssh?

    Yes, we are using key-based authentication, so no password is needed for
    root on one machine to access all other machines thru SSH as root.
    Basically, we have told all the client machines that our server is an
    authorized host, and therefore (if root) not to prompt for a password.

    As for scp on the command line, I haven't tested that yet, but will do soon
    if I have time...

    Thanks for your help so far :D

    Hobbs.

    -- 
    Richard Hobbs (Systems Administrator)
    Toshiba Research Europe Ltd. - Speech Technology Group
    Web: http://www.toshiba-europe.com/research/
    Email: richard.hobbs@crl.toshiba.co.uk
    Tel: +44 1223 376940        Mobile: +44 7811 803377
    http://unixforum.co.uk  http://hififorum.co.uk 
    > --
    > Pete Nesbitt, rhce
    > 
    > 
    > --
    > redhat-list mailing list
    > unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    > https://www.redhat.com/mailman/listinfo/redhat-list
    > 
    > _____________________________________________________________________
    > This e-mail has been scanned for viruses by MCI's Internet 
    > Managed Scanning Services - powered by MessageLabs. For 
    > further information visit http://www.mci.com
    > 
    _____________________________________________________________________
    This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Snehangshu Karmakar: "Voice Auth"

    Relevant Pages

    • csh core dumping 7.0-rc1
      ... After rebooting a FreeBSD 7.0-RC1 server I noticed I could not login ... as root either via ssh or su, I initially thought I forgot my password ... Luckily I had enabled root login on sshd and added my ssh ... Loaded symbols for /lib/libncurses.so.7 ...
      (freebsd-current)
    • [Solution]Re: problem with remote login
      ... ssh from another server with public key identification ... root ... [Feb 12 17:49:32 Executing start method ...
      (comp.unix.solaris)
    • Re: SSH / permissions problem
      ... I've got F13 on my laptop, and also on a new virtual server. ... If I ssh to root on the new server everything is fine, but if I ssh to my user ... I have carefully separated my .bash_profile and .bashrc file into those ...
      (Fedora)
    • Re: bash_history set to zero length
      ... I log in to the server over ssh to carry out various tasks for which I ... sometimes have to su to root. ... Maybe one of these disconnects cause the bash_history to become lost? ...
      (comp.os.linux.security)
    • Re: PubkeyAuth disallowed for root only?
      ... On two of our RedHat EL4 Update 4 servers root cannot login via ssh using public keys. ... if you either run sshd in debug mode or increase LogLevel in sshd_config then the server will provide more information about why the authentication was denied. ...
      (SSH)