scripting - how to run a script file remotely using ssh -
I want to run a script remotely but the system does not recognize the path. It complains that "there is no such file or directory" am I using it?
ssh kev @ server1 `./test/foo.sh`
Baitics will run commands on the local shell and put the results on the command line. What you are saying 'execution ./test/foo.sh and then pass the output such as I type it on the command line'.
Try the following command, and make sure the path from your home directory on your script to the remote computer.
ssh kev @ server1 './test/foo.sh'
In addition, the script should be on a remote computer. What does it do that logs you into a remote computer as your shell with the computer listed. You can not run a local script like this on a remote computer (unless I know nothing).
Comments
Post a Comment