title: How to send data to local clipboard from a remote SSH session
body: <p>Borderline ServerFault question, but I'm <em>programming</em> some shell scripts, so I'm trying here first :)</p>
  
  <p>Most *nixes have a command that will let you pipe/redirect output to the local clipboard/pasteboard, and retrieve from same.  On OS X these commands are</p>
  
  <pre><code>pbcopy, pbpaste 
  </code></pre>
  
  <p>Is there anyway to replicate this functionality while SSHed into another server?  That is, </p>
  
  <ol>
  <li>I'm using Computer A.  </li>
  <li>I open a terminal window</li>
  <li>I SSH to Computer B</li>
  <li>I run a command on Computer B</li>
  <li>The output of Computer B is redirected or automatically copied to Computer A's clipboard.</li>
  </ol>
  
  <p>And yes, I know I could just (shudder) use my mouse to select the text from the command, but I've gotten so used to the workflow of pipping output directly to the clipboard that I want the same for my remote sessions. </p>
  
  <p>Code is useful, but general approaches are appreciated as well.</p>