[Bug 3369] Local script, invoked via "Match ... exec <script>" is disconnected from stdin/stdout

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sun Nov 28 18:29:00 AEDT 2021


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

Darren Tucker <dtucker at dtucker.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED
                 CC|                            |dtucker at dtucker.net

--- Comment #3 from Darren Tucker <dtucker at dtucker.net> ---
(In reply to Carl Ponder from comment #2)
[...]
>      PTY=$(ps --no-headers $$ | xargs index 2)
>      printf "Enter the password: " > /dev/$PTY
>      read -r -s pw < /dev/$PTY

You should be able to use /dev/tty to interact with the controlling
terminal (when ssh has one).

> But I'm still curious why the stdin/stdout are disabled.

Polluting stdin and stdout like that and make ssh useless for shell
pipelines or anything that uses ssh as a transport (eg sftp, scp,
rsync, git).

Anyway, this is working as intended so closing this bug.

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list