title: set environment variable SSH_ASKPASS or askpass in sudoers, resp
body: <p>I'm trying to login to a ssh server and to execute something like:</p>
  
  <pre class="lang-sh prettyprint-override"><code>ssh user@domain.com 'sudo echo "foobar"'
  </code></pre>
  
  <p>Unfortunately I'm getting an error:</p>
  
  <pre><code>sudo: no tty present and no askpass program specified
  </code></pre>
  
  <p>Google told me to either set the environment variable <code>SSH_ASKPASS</code> or to set <code>askpass</code> in the <code>sudoers</code> file. My remote machine is running on Debian 6 and I've installed the packages <em>ssh-askpass</em> and <em>ssh-askpass-gnome</em> and my <code>sudoers</code> file looks like this:</p>
  
  <pre><code>Defaults        env_reset
  Defaults        askpass=/usr/bin/ssh-askpass
  
  # User privilege specification
  root    ALL=(ALL) ALL
  user    ALL=(ALL) ALL
  </code></pre>
  
  <p>Can someone tell what I'm doing wrong and how to do it better.</p>