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

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -