My Actual Problem was to auto execute a sh file to another host and return that output in my system. Is this possible??
"" I've to execute file @ host2 and get write input @ host1 ""
My Actual Problem was to auto execute a sh file to another host and return that output in my system. Is this possible??
"" I've to execute file @ host2 and get write input @ host1 ""
Use SSH:
piskvor@host1$ ssh piskvor@host2 "/home/piskvor/myscript.sh" > myscript.out
What I did here: from host1, I opened a SSH connection as piskvor to host2 and used it to execute /home/piskvor/myscript.sh (assuming it exists and I can run it). The output is redirected to file myscript.out at host1.
If you need password-less login, look into SSH keys.