Note that there are some explanatory texts on larger screens.

plurals
  1. POHiding User Input
    primarykey
    data
    text
    <p>I'm trying to get a script that works both in a native windows shell and a cygwin shell (via ssh) that prompts for and reads a password entered by the user. So far, I have tried the following methods:</p> <ol> <li>using Term::ReadKey and setting ReadMode to 'noecho' <ul> <li>RESULT: returns an error <code>GetConsoleMode failed</code> and quits</li> </ul></li> <li>using Term::ReadPassword::Win32 <ul> <li>RESULT: hangs and never offers a prompt or reads input</li> </ul></li> <li>using IO::Prompt <ul> <li>RESULT: returns an error <code>Cannot write to terminal</code> and quits</li> </ul></li> <li>using Term::InKey <ul> <li>RESULT: returns an error <code>Not implemented on MSWin32: The handle is invalid</code> and quits</li> </ul></li> </ol> <p>All of these work in a native Windows shell (command prompt or power shell), but none of them work when I'm in an ssh session to the server.</p> <p>Really, that's what I'm most interested in, getting it to work in the remote ssh session.</p> <p>I'm getting ssh via cygwin installed on the Windows server (2003 R2). I'm using strawberry perl and not the cygwin perl (cygwin perl breaks other perl scripts I need to run natively in Windows, not via ssh).</p> <p>My best guess is that cygwin+Windows is screwing with strawberry perl enough that it can't tell what kind of environment it is in. I'm looking into alternative sshd+Windows solutions to explore this.</p> <p>These are all the methods I've been able to find in my searching. Does anybody else have any other methods for hiding user input they can suggest?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload