[App_rpt-users] copying files between asterisk boxes under program control

Keith Williamson hkwilliamson at gmail.com
Sun Apr 10 04:31:03 UTC 2011


On Sat, Apr 9, 2011 at 8:35 PM, Ken <ke2n at cs.com> wrote:

> >
> > > Secondly
> > >
> > > If possible, is there a way to direct the output of this transfer to
> > > "stdin" so that it can go directly into another program?
> >
> > Yes, you use ssh for this (not scp).  Here's how:
> >
> > http://gnuru.org/article/1522/copying-with-scp-stdin
>
>
> Yes OK - but I want it to go the stdin of the program running on the remote
> box.
>

I don't know of a way to do what you want to do but I think I'm detecting a
misunderstanding about the way ssh/scp works. There are two sides to a
ssh/scp connection..the client side and the server side. The client side is
implemented with various programs such as PuTTY for Windows and ssh for
Linux. There are many others. The server side on Linux is implemented using
a program called (typically) sshd. The are various distributions of the
server side for Linux such as OpenSSH, Dropbear, and others. When you
connect from system A to system B using ssh (or scp), you are making a
connection between the client program (such as ssh) on system A and the
server program, sshd, on system B. It is not possible to connect ssh on
system A to ssh on system B. The client side program, by necessity, allows
for many different configurations that you can quickly switch between, to
talk to any given remote system's server program. The server program (e.g.
sshd), is configured for a single port. The server program doesn't typically
have a nice user interface like the client since it is configured fairly
statically and just listens for remote connection attempts on it's
configured port.

>From my reading of your email, it seems you are setting up the client on
system A to initiate connection attempts using port 200. Then likewise, you
are setting up the client on system B to initiate connection attempts using
port 200. However the clients don't talk to each other..they talk to the
remote systems server (sshd), which is configured differently (probably port
222). To configure the sshd server on each system, consult the manpage for
sshd on that system.

In terms of what you are trying to achieve, it seems you want an option
within sshd that passes file streams to stdout so that you can pipe that
received file stream into a second program via stdin. I've looked through
OpenSSH's implementation of sshd and nothing jumped out at me that would
allow you to do that.

Regards,

Keith
KF7DRV


> This is the box that is fetching the data/file.
> That means scp needs to send its file data to STDOUT (which would then be
> piped into the next program)
>
> Ken
>
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at ohnosec.org
> http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20110409/cf761a87/attachment.html>


More information about the App_rpt-users mailing list