How to best handle "sudo: no tty present and no askpass program specified"?
This may not be solution for everyone, but it worked in my situation because i could change settings at the remote instance. I followed the following instruction and turned on NOPASSWORD, which is adding the following line into sudoers file:

# Members of the admin group may gain root privileges
%admin  ALL=(ALL) ALL


Afterwards, my custom drush commands with sudo works on the remote instance