Running ssh with option -tt forces a pty allocation on the server even when stdin is not a tty. In that case, on the client side, several tty OS calls fail and generate warnings. For instance: $ ssh -qtt my.host.org sudo cat /tmp/foo </dev/null tcgetattr: Inappropriate ioctl for device As those failures are expected they should be silenced.
Created attachment 1747 [details] suppress-ttyforce.diff suppress tcgetattr/tcsetattr warnings when force_tty_flag in effect.
Please try the diff in attachment #1747 [details]
Created attachment 1748 [details] suppress-ttyforce.diff patch with less junk. Please try this one instead.
applied - this will be in OpenSSH 5.4
With the release of 5.4p1, this bug is now considered closed.