New, so apologies for the wording. Essentially, I'm trying to run a script that contains a sudo command. It's part of a larger process that I'm trying to automate. Is there any way to respond to the password request within the script? I've tried a few things / googling but I haven't had any luck
This is what i tried
sshpass -p $password ssh -t $username@$ip "echo $password | sudo -S docker load < testimage.tar"
when i run this the docker command fails with ,"incorrect password"
I appreciate any time or guidance, thanks!