Re: ssh and compress problem

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 05/24/04


Date: Mon, 24 May 2004 10:54:52 -0400

In article <aea3ce71.0405232117.21d0b9c0@posting.google.com>,
 xiangminyao@yahoo.com (Max) wrote:

> Hi, everyone!
>
> Can anyone please help me to resolve the following "ksh:
> /tmp/CSHM2_P3: cannot open" problem?
>
> I have no problem to create empty data file and named pipe on the
> remote database server by using ssh.
>
> /usr/local/bin/ssh -l myao billdev2 /bin/touch
> /tmp/infranet_cimf_extracts.dat1.Z
> /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777
> /tmp/infranet_cimf_extracts.dat1.Z
>
>
> /usr/local/bin/ssh -l myao billdev2 mknod /tmp/CSHM2_P3 p
> /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777 /tmp/CSHM2_P3
>
> But when I try to run a background job as the following, I get "ksh:
> /tmp/CSHM2_P3: cannot open" error message.
>
> /usr/local/bin/ssh -l myao billdev2 compress < /tmp/CSHM2_P3 >
> /tmp/infranet_cimf_extracts.dat1.Z &
>
> Is there any sytax error? It is OK if I run "compress </tmp/CSHM2_P3>
> /tmp/infranet_cimf_extracts.dat1.Z &" on the database server.

The I/O redirection operators are being processed by the local shell,
not the remote one. You need to quote or escape them if you want those
characters sent to the remote system.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: [Full-disclosure] Restricting access to SVCCTL named pipe on Windows
    ... Indeed, with such an access, it's possible to restart services ... > that where disabled for security reasons, like remote registry access, or to ... the changes made using pipeaclui will be discarded and the ... > defaults of whatever started the named pipe will be used". ...
    (Full-Disclosure)
  • [Full-disclosure] Restricting access to SVCCTL named pipe on Windows
    ... Indeed, with such an access, it's possible to restart services that where disabled for security reasons, like remote registry access, or to install remotely new services. ... the pipeaclui from bindview, I guess it's possible to define ACL that deny any access but it is said that "Anytime a named pipe is restarted, the changes made using pipeaclui will be discarded and the defaults of whatever started the named pipe will be used". ...
    (Full-Disclosure)
  • Re: ssh and compress problem
    ... >> I have no problem to create empty data file and named pipe on the ... >> remote database server by using ssh. ... You need to quote or escape them if you want those ...
    (comp.unix.admin)