Re: SSH and remote commands

From: Dimitri Maziuk (dima@127.0.0.1)
Date: 04/24/03


From: Dimitri Maziuk <dima@127.0.0.1>
Date: Thu, 24 Apr 2003 16:10:41 +0000 (UTC)

Glen sez:
> 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.

Upgrade both to 3.4 or better.

Dima

-- 
Tlaloc: What was Elrond's second name?
Gruber: Hubbard                           -- <ahbou=3C69EB63.A7C431F4@last.com>


Relevant Pages

  • SSH and remote commands
    ... I have a script to run tripwire remotely an several hosts. ... I need the tripwire remote command to finish before going on to the ... Client:OpenSSH_2.9p2, SSH protocols 1.5/2.0, OpenSSL 0x0090602f ...
    (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)