ssh host echo bla | echo bla
Ed Phillips
ed at UDel.Edu
Tue Dec 18 04:55:20 EST 2001
It's even worse with csh (my first test was tcsh):
polycut:~> csh -f
polycut.nss.udel.edu% ssh ldap1 echo bla | echo bla
bla
polycut.nss.udel.edu% Reset tty pgrp from 13749 to 13747
<..hang..>
If I hit CTRL-C and type "jobs" I get:
^C
polycut.nss.udel.edu% jobs
[1] Hangup ssh ldap1 echo bla |
polycut.nss.udel.edu%
The following works fine...
polycut:~> ssh ldap1 ps -eaf | egrep slapd
...
The other thing is that /bin/rsh behaves the same way as ssh does in my
first test:
polycut:~> rsh mahler echo bla | echo bla
bla
polycut:~> polycut:~>
No actual connection to the remote system is made. Very weird.
Ed
On Mon, 17 Dec 2001 mouring at etoh.eviladmin.org wrote:
> Date: Mon, 17 Dec 2001 10:59:59 -0600 (CST)
> From: mouring at etoh.eviladmin.org
> To: Ed Phillips <ed at UDel.Edu>
> Cc: OpenSSH Development <openssh-unix-dev at mindrot.org>
> Subject: Re: ssh host echo bla | echo bla
>
>
> 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
> >
> >
>
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