[opensuse] Howto call and execute a remote script in bash? Is it rsh or nothing?
Listmates, I don't know if this is possible without socket programming, but is there anyway I can call a local script that would execute a script on a remote machine? Basically, I have several remote servers at the office. I check/test updates on my home server/testbox before updating the boxes at work. After I have confirmed the updates at home, I would like to call a script that would cause the update script on the remote machine to run. I can't figure out how to get past establishing the ssh connection. I can connect just fine, but that's were it ends, I'm on the remote box and it is waiting for me to do something. Can I modify the remote .bashrc and pass some ssh parameter to cause .bashrc to run the script? Am I stuck with rsh? As always any help or point to the right man page will be greatly appreciated. -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
David C. Rankin wrote:
Listmates,
I don't know if this is possible without socket programming, but is there anyway I can call a local script that would execute a script on a remote machine?
yes. The original way to run a command on a remote machine would be through the use of rsh. However, I believe that rsh is now considered to be flagrantly insecure. So use I believe the secure method is this: ssh remotehostname /path/to/script/on/remote/machine I don't know if ssh will pass arguments -- if not, then write the script to either generate the arguments as needed, or you can pass the arguments by putting them into a file, copying them to the target machine using scp (just before calling ssh), and then having a wrapper on the remote machine which does something like this: scriptname < `cat scriptars`.
Basically, I have several remote servers at the office. I check/test updates on my home server/testbox before updating the boxes at work. After I have confirmed the updates at home, I would like to call a script that would cause the update script on the remote machine to run. I can't figure out how to get past establishing the ssh connection. I can connect just fine, but that's were it ends, I'm on the remote box and it is waiting for me to do something.
Hmmm.. You have should have a shell prompt...
Can I modify the remote .bashrc and pass some ssh parameter to cause .bashrc to run the script? Am I stuck with rsh? As always any help or point to the right man page will be greatly appreciated.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
David C. Rankin wrote:
Can I modify the remote .bashrc and pass some ssh parameter to cause .bashrc to run the script? Am I stuck with rsh? As always any help or point to the right man page will be greatly appreciated.
--- Is there a reason why your local script can't use ssh to run the remote command: #!/bin/bash # (local script....) ssh [-n] Remotesys ['nohup' cmd] /path/remotescript [redirection] -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Linda Walsh wrote:
David C. Rankin wrote:
Can I modify the remote .bashrc and pass some ssh parameter to cause .bashrc to run the script? Am I stuck with rsh? As always any help or point to the right man page will be greatly appreciated.
--- Is there a reason why your local script can't use ssh to run the remote command:
#!/bin/bash # (local script....) ssh [-n] Remotesys ['nohup' cmd] /path/remotescript [redirection]
Only one I could think of before your post was "lack of knowledge" ;-) (Notes [command] at the end of man ssh "synopsis" -- kicks self for another forest-for-the-trees issue) Thanks Linda -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
David C. Rankin
-
Edmund Fitzgerald
-
Linda Walsh