Note:
1) I have read write permission to my remote machine script myScript.sh
2) I can able to manually execute the command "ec2-create-volume --size 10 --availability-zone us-east-1a" successfully
If i want to execute the same with ssh via script, how i should procede. Please help me on this.
I am looking for to execute the shell script through ssh. Getting error as File not found: ''
1) $ssh -i key.pem root@<host> -C "sh /root/myScript.sh"
Output: File not found: ''
2) $ssh -i key.pem root@<host> -C "/bin/sh ec2-create-volume --size 10 --availability-zone us-east-1a"
Output: File not found: ''
Note:
1) I have read write permission to my remote machine script myScript.sh
2) I can able to manually execute the command "ec2-create-volume --size 10 --availability-zone us-east-1a" successfully
If i want to execute the same with ssh via script, how i should procede. Please help me on this.
What may be the issues ?