I am trying to run a sshpass command inside a bash script but it isn't working.
If I run the same command from the terminal it works fine but running it in a bash script it doesn't.
#! /bin/bash
sshpass -p 'password' ssh user@host command
I am aware of the security issues but its not important now.
Can someone help? Am I missing something.
Thanks