Bug 2339 - openssh consumes stdin even if command isn't interactive
Summary: openssh consumes stdin even if command isn't interactive
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 5.9p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-21 23:57 AEDT by EBrauer
Modified: 2015-01-21 23:57 AEDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EBrauer 2015-01-21 23:57:07 AEDT
As ssh has the -n option for this (and therefor I'd treat this as a documentation enhancement), it should be clearly stated in the manual page that even a "ssh <host> true" will eat stdin. This is especially not obvious here (bash script):

echo -e "1\n2\n3" | while read s; do echo Hello; done

vs.

echo -e "1\n2\n3" | while read s; do ssh <host> echo Hello; done

Please, add this to documentation - it'd have saved me some time ;)

Kind regards
Eckard