1

I have access to a machine running SunOS 5.10 (called solaris). I also have access to a RedHat machine (called redhat).

ssh -tt seems not to give me output if run from solaris to solaris, but works as expected otherwise. From redhat to solaris:

redhat$ </dev/null ssh -tt solaris echo ged
ged
Connection to solaris closed.

From solaris to redhat:

solaris$ </dev/null ssh -tt redhat echo ged
tcgetattr: No such device or address
ged
Connection to redhat closed.

From solaris to solaris:

solaris$ </dev/null ssh -tt solaris echo ged
Connection to solaris closed.

Hmm... that looks as if the command is not run or the output is dropped. From solaris to solaris:

solaris$ rm -f /tmp/ged
solaris$ </dev/null ssh -tt solaris touch /tmp/ged
solaris$ ls -l /tmp/ged
-rw-r--r--   1 tange    other          0 Aug  8 07:02 /tmp/ged

So the command is clearly run; it is only the output that is dropped.

How can I get the output from ssh?

Background

The above is the essence of a bug in GNU Parallel and that is also why </dev/null and -tt are needed:

  • </dev/null is because we run multiple commands in parallel, thus they can not get the current tty.
  • -tt is needed because otherwise Ctrl-C will not work remotely.

Update

It seems it is due to this bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1199

A workaround seems to be to get a PTY from Perl and use that:

perl -MIO::Pty -e '$pty = new IO::Pty; print $t=$pty->ttyname(),"\n"; print `openssh-5.0p1/ssh -tt solaris.p echo foo < $t`'

Unfortunately IO:Pty is not installed on Solaris 5.10 and it is not just a Perl package, but also an .xs file - thus it requires a C-compiler, too; therefore not a good solution.

So the question is: Can SunSSH 1.1 and OpenSSH 5.0 be made to workaround this - possibly with the help of Perl?

0

You must log in to answer this question.

Browse other questions tagged .