title: Escape single quotes ssh remote command
body: <p>I read any solutions for escape single quotes on remote command over ssh. But any work fien.</p>
  
  <p>I'm trying </p>
  
  <pre><code>ssh root@server "ps uax|grep bac | grep -v grep | awk '{ print $2 }' &gt; /tmp/back.tmp"
  </code></pre>
  
  <p>Don't work awk</p>
  
  <pre><code>ssh root@server "ps uax|grep bac | grep -v grep | awk \'{ print $2 }\' &gt; /tmp/back.tmp"
  ....
  awk: '{
  awk: ^ caracter ''' inválido en la expresión
  </code></pre>
  
  <p>And try put single quotas on command but also don't work.</p>
  
  <p>Aprecite help</p>