SSH and remote commands

From: Glen (pondapple@earthlink.net)
Date: 04/23/03


From: pondapple@earthlink.net (Glen)
Date: 23 Apr 2003 12:49:13 -0700

I know that this question has been asked many times because I have
searched quite a bit on the problem, but I am still unable to figure
out how to get the script to work correctly so here it goes anyway.
I have a script to run tripwire remotely an several hosts.
Once the ssh line is ran, the ssh session never closes completely so
my script does not continue.

I have tried the FAQ and these example redirections (< /dev/null >&
/dev/null
ssh remote.machine command >/dev/null </dev/null 2>/dev/null
< /dev/null > /dev/null 2>&1 & at the end of the ssh command) with no
success.

Here is the command I am running:
ssh -l root $machine "umask 077 ; cd ${remote_tripdir};
${remote_tripdir}/tripwire -initialize -c ${remote_tripdir}/tw.config
2>&1 | tee ${remote_tripdir}/initoutput >> /dev/null"

I need the tripwire remote command to finish before going on to the
next command in the script because the next line copies output from
the remote command to someplace else.

Client:OpenSSH_2.9p2, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
Server: OpenSSH_2.5.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090600f

Can anyone help me work through this?
Any help is appreciated.

Thanks



Relevant Pages

  • Re: SSH and remote commands
    ... > out how to get the script to work correctly so here it goes anyway. ... > Once the ssh line is ran, the ssh session never closes completely so ... > I need the tripwire remote command to finish before going on to the ...
    (comp.security.ssh)
  • Re: [opensuse] Re: Howto call and execute a remote script in bash? Is it rsh or nothing?
    ... Am I stuck with rsh? ... Is there a reason why your local script can't use ssh to ... run the remote command: ...
    (SuSE)
  • Re: Using Putty Command Line, -m option, problems...
    ... Heh - thanks. ... You'd never know that from the documentation: ... The -m option performs a similar function to the "Remote command" box ... or a whole shell script. ...
    (comp.security.ssh)
  • cluster monitorng
    ... Is there any tool that helps monitor cluster status ... with mail alerts? ... Or a remote command line to check status using a script? ...
    (microsoft.public.windows.server.clustering)