ssh - sudo: no tty present and no askpass program specified - Ask Ubuntu


when attempting run remote binary using sudo on remote box:

ssh remotehost "sudo ./binary" 

i see error:

sudo: no tty present , no askpass program specified

how can work around this?

edit not duplicate of question suggested such. answers there irrelevant. in fact, changes sudoers file applied remote host.

a simple way specify -t:

ssh -t remotehost "sudo ./binary" 

from man page:

force pseudo-tty allocation. can used execute arbitrary screen-based programs on remote machine, can useful, e.g. when implementing menu services. multiple -t options force tty allocation, if ssh has no local tty.

i cannot explain why works, , there may better way. i'd hear if :)

@psusi explains why works in comment below.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User