ssh host echo bla | echo bla

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Tue Dec 18 03:59:59 EST 2001


Oh a clean (much better this time. =)  install on Solaris it does:

$ ssh localhost echo bla | echo bla
bla
lindstro at localhost's password:
Connection to localhost closed by remote host.

And no jobs are left over.. Which in a lot of respect what I would
expect.

connect to the server, echo 'bla' from the server pass it out stdout.  Hit
the sent '| echo bla'  which is local (because you are not quoting).  It
is lost because the second program disgards all stdin and writes it's
own output.

Not dead sure why Markus was asking what the right behavior should be
since the above is the right behavior (even if I had broken test ssh
servers around the first time. =).

Not sure why yours is background anything.  I can verify this on Linux,
OpenBSD, and Solaris as behavior this way.

- Ben

On Mon, 17 Dec 2001, Ed Phillips wrote:

> When I run this on Sol8 with 2.9.9p2 it doesn't even connect to the remote
> host...
>
> polycut:~> ssh ldap1 echo bla | echo bla
> bla
> polycut:~> polycut:~>
>
> If I type "jobs" afterwards...
>
> polycut:~> ssh ldap1 echo bla | echo bla
> bla
> polycut:~> polycut:~> jobs
> [1]    Hangup                        ssh ldap1 echo bla |
> polycut:~>
>
> That doesn't seem like a desirable result... :-(
>
> 	Ed
>
> On Mon, 17 Dec 2001 mouring at etoh.eviladmin.org wrote:
>
> > Date: Mon, 17 Dec 2001 09:59:19 -0600 (CST)
> > From: mouring at etoh.eviladmin.org
> > To: openssh-unix-dev at mindrot.org
> > Subject: Re: ssh host echo bla | echo bla
> >
> >
> >
> > FYI.. That is under Solaris it does that..  OpenBSD returns.
> >
> > Interesting
> >
> > - Ben
> >
> > On Mon, 17 Dec 2001 mouring at etoh.eviladmin.org wrote:
> >
> > >
> > > [mouring at newton ~]$echo blah | echo blah
> > > blah
> > >
> > > I would expect no less from OpenSSH myself.  2.9.9 (which was the machine
> > > I had right handly) hangs indefinately after printing 'blah'.
> > >
> > > - Ben
> > >
> > > On Mon, 17 Dec 2001, Markus Friedl wrote:
> > >
> > > > what should ssh do for:
> > > > 	$ ssh host echo bla | echo bla
> > > > 	$ ssh -1 host echo bla | echo bla
> > > > 	$ ssh -2 host echo bla | echo bla
> > > >
> > > > -m
> > > >
> > >
> > >
> >
>
> Ed Phillips <ed at udel.edu> University of Delaware (302) 831-6082
> Systems Programmer III, Network and Systems Services
> finger -l ed at polycut.nss.udel.edu for PGP public key
>
>




More information about the openssh-unix-dev mailing list