title: EOF to file on remote host
body: <p>I need to "cat" a text inside shell script to remote machine via ssh.
  This is required for simplicity, so i don't need to keep extra file.</p>
  
  <p>For instance</p>
  
  <pre><code>#!/bin/sh
  VAR="some"
  VAR1="something"
  
  cat &lt;&lt; EOF
  apple
  green
  tree
  EOF   ---&gt; cat to file.txt on remote machine
  
  do some command
  do some command1
  exit 0
  </code></pre>