https://bugzilla.mindrot.org/show_bug.cgi?id=2965

            Bug ID: 2965
           Summary: OpenSSH for Windows hangs if there is no STDIN
           Product: Portable OpenSSH
           Version: 7.9p1
          Hardware: Other
                OS: Windows 10
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: ssh
          Assignee: [email protected]
          Reporter: [email protected]

The simplest repro is to run the following in a cmd shell:

> ssh user@host -- echo x < NUL:
x
GetConsoleMode on STD_INPUT_HANDLE failed with 6


... and then it hangs and is unresponsive to input. If instead you pipe
in an empty file it works fine.

This becomes a pain when you are writing a script that shells out to
ssh to run a single remote command, as you need to provide a stdin file
or it will hang. So for example, in python on Windows:

subprocess.check_output(['ssh', 'user@host', '--', 'echo', 'x'])

will hang.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to