Unable to execute shell script, receiving the errors
The shell script I wrote connects to remote server over ssh and executes commands.
sudo: no tty present and no askpass program specified sudo: pam_authenticate: Conversation error
The User with which I'm establishing ssh connection has sudo privileges on the remote server but the user account is not defined locally within the system [User is authenticating using a centralized service].
While I may have overcome the first error
sudo: no tty present and no askpass program specified
by using "sudo -S" within the script the second error persists
I'm using sshpass utility to pass ssh password:
sshpass -p 'PASSWORD' ssh -n -o StrictHostKeyChecking=no $USER@$IPADDRESS "COMMANDS"