title: How to execute a command over ssh and store the value in a variable
body: <p>I am trying to  get the value of uname -r from a remote machine over ssh and use that value in my local script flow.</p>
  
  <pre><code>kern_ver=uname -r
  sshpass -p "$passwd" ssh -o StrictHostKeyChecking=no root@$c 'kern_ver=echo \$kern_ver'
  </code></pre>
  
  <p>But looks like the value is not getting passed back to the local script flow .</p>