I am trying to patch a bunch of CENT OS machines with the latest fix pack. I have the below bash script that takes csv file as a input which has the ip address and password
You can pass ssh another -t
to force pty allocation:
ssh -t -t
Add at the end of your sshpass command </dev/null
.
Defaults:username !requiretty
to your /etc/sudoers
config-t
from your ssh command