Ssh - sudo no-tty-present-and-no-askpass-program-specified-error
ssh -t remotehost "sudo <cmd>"
Granting the user to use that command without prompting for password should resolve the problem. First open a shell console and type:
Then edit that file to add to the very end:
username ALL = NOPASSWD: /fullpath/to/command, /fullpath/to/othercommand
john ALL = NOPASSWD: /sbin/poweroff, /sbin/start, /sbin/stop
will allow user john to sudo poweroff, start and stop without being prompted for password.
atau yang lebih extrim
Use NOPASSWD line for all commands, I mean:
nicholsonjf ALL=NOPASSWD: ALL jenkins ALL=(ALL) NOPASSWD: ALL
Put the line after all other lines in the sudoers file.