I have a script which runs another script via SSH on a remote server using sudo. However, when I type the password, it shows up on the terminal. (Otherwise it works fine)>
I faced a problem,
user1@server1$ ssh -q user1@server2 sudo -u user2 rm -f /some/file/location.txt Output: sudo: no tty present and no askpass program specified
Then I tried with
#1 vim /etc/sudoers Defaults:user1 !requiretty
didn't work
#2 user1 ALL=(user2) NOPASSWD: ALL
that worked properly!