title: Chef - running remote SSH commands
body: <p>How could I go about running remote SSH commands using Chef? For example, bringing the following command into a recipe</p>
  
  <pre><code>ssh -T user@host.com &lt;&lt;'ENDSSH'
  cat /etc/*-release
  ENDSSH
  </code></pre>
  
  <p>Using the <code>execute</code> resource</p>
  
  <pre><code>execute "some_resource" do
    command "ssh -T user@host.com &lt;&lt;'ENDSSH'
    cat /etc/*-release
    ENDSSH"
    action :run
  end
  </code></pre>
  
  <p>Results in</p>
  
  <pre><code>warning: here-document at line 0 delimited by end-of-file (wanted `ENDSSH')
  </code></pre>
  
  <p>I haven't tried using <code>bash</code> with <code>ENDSSH</code>, however. Using <code>EOT</code> seems to conflict with the outer <code>EOH</code> expected when using the <code>bash</code> resource. Would this be possible using Chef, or would something along the lines of <code>Mixlib::ShellOut</code> be more suitable to work around either indentations being added or parsed out by Chef when using <code>HEREDOC</code> which I assume is the cause? In either case, stability seems questionable. </p>
  
  <p>Thanks!  </p>