sudo over ssh fails with "no tty present and no askpass program specified"

Solution Verified - Updated -

Issue

  • sudo over ssh fails with the following error:

    $ ssh testuser@ssh-srv sudo echo Success
    testuser@ssh-srv's password: 
    sudo: no tty present and no askpass program specified
    

Environment

  • Red Hat Enterprise Linux
  • sudo over ssh

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In