Edmond Rodriguez on 25 Mar 2015 06:31:38 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] ssh's with -t , can one maintain individual streams?

I don't think anyone answered this email, and I tried some ideas
yesterday.  I thought I would comment on my last mail.

It ocurred to me yesterday that maybe I could play a trick using
xterms (with -e option) to be able to enter a password and perhaps
also try to make use of /dev/sdtin and /dev/stdout.

But what I discovered along the way is simply adding "-Y"  to the ssh
commands causes ssh to open a dialogue  box asking for the needed
passwords!     I knew -Y gives one an X Windows channel but never knew
ssh would also use it to get passwords.

The example problem I presented below of course is very simple so, I
could clearly ask the question.

using the -Y and seeing that I can now enter passwords for remote
machines is really helpful when trying to transfer data across more
than one machine that are only networked serially without keys

So maybe something like this

ssh -Y A ssh -Y B ssh -Y C echo hello

or some other reason to execute data on another machine and perhaps
bring back the stdout to the first machine, or push data through the
stream etc..... and things get more complicated from there......


On Sun, Mar 8, 2015 at 7:06 PM, Edmond Rodriguez
<erodrig97.list@gmail.com> wrote:
> Consider the following command series of ssh's.
> There are no keys set up, all ssh's want passwords.
> ->  ssh A ssh B ssh C echo hello
> This has the issue of getting passwords to ssh on machine B and ssh on
> machine C.
> Now one way to solve that might be to use -t
> -> ssh -t A ssh -t B ssh -t C echo hello
> That works, each ssh can ask for a password BUT...
> all the streams now seem combined into one.  tty (I know that's not
> really a stream, but the allocated tty's seem to now be STDIN and
> (maybe not STDERR, did not test that).
> Lets say we want to cat a file and direct it to our local machine.
> -> ssh -t A ssh -t B ssh -t C cat test.txt  > localTest.txt
> This does not really work, since all kinds of other data is also
> redirected out, like password prompts, , warning messages, etc.
> Is it possible, without the use of keys, to get this series to work
> and preserve what is stdout and stderr?  but still allow for some sort
> of tty to get passwords to all the ssh's?
> Thanks for any responses,
> Edmond
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug