title: Bash: using EXPORT inside SSH command
body: <p>When executing this command:</p>
  
  <pre><code>user@local:~ &gt;ssh user@remote " export myvar=myvalue ; echo myvar=$myvar ; "
  </code></pre>
  
  <p>I get output:</p>
  
  <pre><code>myvar=
  </code></pre>
  
  <p>When running directly on remote machine, I get the expected result:</p>
  
  <pre><code>user@remote:~ &gt; export myvar=myvalue ; echo myvar=$myvar ;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>myvar=myvalue
  </code></pre>
  
  <p>So how to set a variable inside ssh command?</p>