Solved

Running a remote script

Posted on 2004-09-19
3
300 Views
Last Modified: 2010-04-21
Experts,

            Currently I run about 25 scripts per day to perform various tasks on various linux servers. I am looking for a program that will remotly run scripts for me. Basicly all it needs to do is store a script, connect to SSH, run the script and exit. Your help is much appreciated. Thank you.
0
Comment
Question by:capacity
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 250 total points
ID: 12097957
If you pre-configure the servers for a public/private key exchange, so you don't have to enter a password this gets really simple. And it gets even simpler if you install your scripts on the server, say in /usr/local/sbin. All that's necessary then is a script that uses ssh to run the script on the remotes, something like:

#!/bin/sh
#
# Execute Scripts on server1
#
ssh remote-user@server1.dom.tld /usr/local/sbin/script1
ssh remote-user@server1.dom.tld /usr/local/sbin/script2
#
# Execute Scripts on server2
#
ssh remote-user@server2.dom.tld /usr/local/sbin/script1
ssh remote-user@server2.dom.tld /usr/local/sbin/script2
0
 

Author Comment

by:capacity
ID: 12098162
Thank you for your commends, however, I am looking for a name or a link to an actual program. We have previously established scripts and put them on the servers, now all that is left is the program that will go and execute them.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12099298
The program for executing the scripts will be ssh, as I showed above. If you need to execute a number of scripts on the servers, one after the other you could use a wrapper script that you install on the server that will execute each script in turn. Or run ssh from a local script like I described.

Maybe I don't fully understand your problem. What is it about what I've described that is a problem?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question