Bug 2339

Summary: openssh consumes stdin even if command isn't interactive
Product: Portable OpenSSH Reporter: EBrauer <ebrauer-mailing>
Component: DocumentationAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: enhancement    
Priority: P5    
Version: 5.9p1   
Hardware: Other   
OS: Linux   

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