Tag Archives: no tty

sudo: no tty present and no askpass program specified | sudo: no tty present and no askpass program specified

I was setting up automated logon with SSH, and wanted to have root access via sudo to perform certain tasks. Ended up getting these errors when I tried to run sudo commands over the ssh link.

The cause of this error is not having the correct setup on your /etc/sudoers file. Here is the fix.

Edit your sudoers file with

visudo

Ensure your usernames entry looks like this.

Ensure the NOPASSWD is present, that does the trick.