title: How to run remote script with sudo access
body: <p>I am trying to run a remote script which need to run as a sudo but its unable to run the script as sudo. Is my approach is correct to do sudo? Please help..Thanks in advance.</p>
  
  <pre><code> spawn ssh -t {*}$ssh_opts $user@$ip bash $script {*}$argv
  </code></pre>