Quantcast
Channel: sudo: no tty present and no askpass program specified - Ask Ubuntu
Viewing all articles
Browse latest Browse all 7

Answer by Drew Noakes for sudo: no tty present and no askpass program specified

$
0
0

A simple way is to specify -t:

ssh -t remotehost "sudo ./binary"

From the man page:

Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.

I cannot explain exactly why this works, and there may be a better way. I'd like to hear about it if so :)

@psusi explains why this works in a comment below.


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>