I'm trying to execute the below command:
#sudo ssh -o StrictHostKeyChecking=no username@serverip /var/scripts/test.sh
How can I use this command without ssh keys and with encrypted password in a script?
I'm trying to execute the below command:
#sudo ssh -o StrictHostKeyChecking=no username@serverip /var/scripts/test.sh
How can I use this command without ssh keys and with encrypted password in a script?
You could use say a tool such as Ansible Vault (or equivalent) to encrypt the password, then feed it into the ssh command with sshpass.
You will end up with a master passphrase with such a setup of course.