2
I'm trying to execute a script in the remote machine using ssh
. I'm using the below command,
ssh -i <remote pem> <user name>@<ip> "sh <full path of script in remote> <parameter>"
In the script referred by <full path of script in remote>
, I'm referring to another file as . ./config.sh
. Where the config.sh
is a sibling of the remote script that I'm trying to execute. But I'm getting the below error.
+ . ./config.sh
<full path of script in remote>: 4: .: Can't open ./config.sh
When the config.sh
is available as a sibling for the script that I'm trying to execute with requrired rights, why am I getting this error? How to get around this?