3.11.3.30 -legacy-stdio-prompts: handle Windows console prompts like older versions of PuTTY

This option applies to all of PSCP, PSFTP and Plink on Windows: all the tools in the PuTTY suite that run in a Windows console and make SSH connections.

These tools use the Windows console to prompt for various information: usernames, passwords, answers to questions about host keys, and so on.

In current versions of PuTTY, these prompts work by direct access to the Windows console. This means that even if you redirect the standard input or output of the tool, prompts will still be sent to the console (and not where you've redirected your output), and the user's responses will be read from the console (and not from where you've redirected your input).

Another advantage of reading directly from the Windows console is that the tools can read input as Unicode. So this also allows you to enter usernames and passwords that contain characters not in the Windows system's default character set.

In versions of the PuTTY tools up to and including 0.81, the prompts used the tool's ordinary I/O handles, so prompt output and user responses could be redirected.

We think the new behaviour is more likely to be useful. For example, if you have a local command that generates output, and you want to pipe that output into a command running remotely via Plink, you can run a command line such as

local_command | plink hostname remote_command

and the data piped into the remote command will be the same whether or not Plink has to stop to ask for a password. With the old behaviour you would have had to include the password in Plink's input, which is more awkward.

However, we recognise that people may have customised complicated workflows around the old behaviour. So if you need to switch back to it, you can do so by specifying -legacy-stdio-prompts on the command-line.

To fully revert to the previous behaviour, you'd also need to specify -legacy-charset-handling (see the next section). (Even without that option, prompt handling with -legacy-stdio-prompts may not be fully Unicode-clean.)