Why does this cause Mac OSX to print over SSH?
Terminal.app probably implements the "media copy" (printer) escape sequence from VT100s.  You can read about those control sequences at vt100.net, or in the XTerm Control Sequences, e.g.,

CSI Pm i  Media Copy (MC).
        Ps = 0  -&gt; Print screen (default).
        Ps = 4  -&gt; Turn off printer controller mode.
        Ps = 5  -&gt; Turn on printer controller mode.
CSI ? Pm i
      Media Copy (MC, DEC-specific).
        Ps = 1  -&gt; Print line containing cursor.
        Ps = 4  -&gt; Turn off autoprint mode.
        Ps = 5  -&gt; Turn on autoprint mode.
        Ps = 1  0  -&gt; Print composed display, ignores DECPEX.
        Ps = 1  1  -&gt; Print all pages.