- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- execute rlogin with local script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 05:33 AM
02-01-2002 05:33 AM
Hi. I??ve got many servers (B,C,D,E..) and a script in A server. Are there any way to execute that script from server A to the others?. If I run remsh, It tries to execute the script from the others servers, not from MY A. It would be bothersome to ftp script in all servers...
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 05:39 AM
02-01-2002 05:39 AM
Solution# On server A
for i in B C D E
do
rcp /tmp/script1 $i:/tmp
remsh $i -c "/tmp/script1"
done
If access rights are the other way, instead of an 'rcp', perform a 'remsh -c 'rcp A:/tmp/script1 /tmp''
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 05:42 AM
02-01-2002 05:42 AM
Re: execute rlogin with local script
You could try to share a single directory from A where you save the script and mount this share on all the other machines.
Then you don't need to ftp the script to the other machines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 05:59 AM
02-01-2002 05:59 AM
Re: execute rlogin with local script
If the script is not too complicated, you should be able to:
cat script | remsh host "/sbin/sh"
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 06:00 AM
02-01-2002 06:00 AM
Re: execute rlogin with local script
in your home directory create .rhosts with the following entry:
A username
After this do what listed below:
for i in B C D E
do
rcp /tmp/script1 username@$i:/tmp
remsh $i -l username -n "/tmp/script1"
remsh $i -l username -n " rm /tmp/script1"
done
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:54 AM
02-04-2002 06:54 AM
Re: execute rlogin with local script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2002 04:48 AM
02-08-2002 04:48 AM
Re: execute rlogin with local script
I have scripts that I run to add and delete printers, directories, etc. I don't rerally want to copy the script onto the other machines, (leaves a lot of junk for me to clean up). Can I execute the script from server A on servers BCD and E without copying it over? I don't really want to NFS mount drives to my servers due to security considerations.
Suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2002 04:58 AM
02-08-2002 04:58 AM
Re: execute rlogin with local script
I don't think you can do this. The essence of the answer to this question was that the Script does have to be on the remote server.
How about creating a 'depot' on all Servers for common scripts? I use '/usr/local/bin' and any scripts I create for one server, I try to rollout to all for future use.
If you really want a clean system with no scripts remaining, federicos answer above gives the perfect solution.
Share and Enjoy! Ian
PS If you post this as a separate question, you can credit people with points for the answers that are given.