Running scripts from different server | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Running scripts from different server

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-20-2013
chococrunch6 chococrunch6 is offline
Registered User
 
Join Date: Dec 2012
Last Activity: 20 February 2013, 6:18 AM EST
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Running scripts from different server

Hi,

I need a script (ksh) on ServerAdmin that will run an archive scripts from different several Servers through ssh. The problem is that how can i switch user when before running the archive script. I already configured password-less connection on the servers.


Code:
server 1
/usr/bea/home/domain1/scripts/archive1.sh ; switch user to domain1

server 2
/usr/bea/home/domain2/scripts/archive2.sh ; switch user to domain2

server 3
/usr/bea/home/domain3/scripts/archive3.sh ; switch user to domain3

server 4
/usr/bea/home/domain4/scripts/archive4.sh ; switch user to domain4

thanks!

Last edited by chococrunch6; 02-20-2013 at 05:34 AM..
Sponsored Links
    #2  
Old 02-20-2013
pavankiran56 pavankiran56 is offline
Banned
 
Join Date: Feb 2013
Last Activity: 9 January 2014, 3:53 AM EST
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
u can try


Code:
ssh -q server-name "command"



just an idea to start with
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Running scripts within scripts from cron sirbrian Shell Programming and Scripting 4 07-14-2009 10:04 AM
Running scripts via su ravi.sri24 Shell Programming and Scripting 8 02-11-2009 11:28 AM
Running scripts from home mastachef UNIX for Dummies Questions & Answers 2 12-07-2007 05:51 PM
Running three scripts parallelly anwarsait Shell Programming and Scripting 1 07-18-2006 01:20 AM
Running shell scripts on a remote server pepintheshort UNIX for Dummies Questions & Answers 2 07-22-2003 04:20 PM



All times are GMT -4. The time now is 02:41 PM.