I'm trying to execute a local file (here
/tmp/cmd) on a remote machine (slc05bkt) using SSH. Here's the command I'm trying from a script file:
cmd="ssh -v ssuthari@slc05bkt \"bash -l -s\" < /tmp/cmd" $cmd
It's giving me the following exception:
ksh: line 1: /tmp/cmd: cannot open [No such file or directory]
Even after I added a copy of this local file to remote machine in the same location, it's giving me one more error :
ksh: line 1: bash -l -s: not found
The irony here is I'm able to execute the command directly on command line, but I'm unable to execute above lines from the script. Can someone please help me out on solving this issue?