On Feb 7, 12:40 pm, John Joyce <dangerwillrobinsondan...@gmail.com>
wrote:
> On Feb 7, 2008, at 9:09 AM, wbsurf...@yahoo.com wrote:
>
>
>
> > On Feb 7, 10:00 am, yermej <yer...@gmail.com> wrote:
> >> On Feb 7, 8:22 am, "wbsurf...@yahoo.com" <wbsurf...@gmail.com> wrote:
>
> >>> The following program does not get past the part where sudo asks
> >>> for a
> >>> password. Any ideas ?
> >>> This is run from windows onto a linux box, so I can't use a local
> >>> ssh
> >>> command.
>
> >> This is just a guess as I haven't used Net::SSH, but you might
> >> need to
> >> append a newline to the password that's being sent to sudo.
>
> >> Also, there are Win32 ports of the ssh client so you probably could
> >> use a local ssh command.
>
> > Thanks,
>
> > Adding a newline didn't work. The remote host will prompt with
> > "Password:" . Is it possible I have to read that prompt out of the
> > stream ?
>
> > Is it possible that linux sudo reads the password from the terminal
> > and not stdin ?
>
> > In order to use win32 ssh, I have to install that from someplace so
> > that I can use it from a DOS shell I think you mean ? Otherwise if I
> > try to do ssh inside of a ruby process it won't work.
>
> it is read from stdin
I think I also so a man page on sudo that said -S causes it to read
the password from stdin, that is why I wondered if it might be able to
do some other kind of input from the terminal, raw input or something
by default for security reasons ?