The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ls command in Remote Server vasuarjula Shell Programming and Scripting 6 06-08-2008 11:11 AM
ls -ltr command On Remote server vasuarjula Shell Programming and Scripting 2 06-01-2008 09:55 AM
ls command in Remote Server vasuarjula AIX 0 05-30-2008 09:22 PM
script to send command periodically to remote server sayeo Shell Programming and Scripting 2 03-17-2008 03:42 AM
Transfer file from local unix server to remote server indira HP-UX 2 05-02-2007 05:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-30-2002
Jimbo
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
remote server command in a job

I need a cron job to shut services running on other nodes, do some db maintenance, then restart the remote services. This is HP-UX 11.00.

I cannot get remsh to work, even interactively. Per man page, does not prompt for password. I get:

remsh appserver -l oracle stop_services
remshd: Login incorrect.

If I don't specify the stop_services command, then remsh runs rlogin (as per the man page), which works, but is not what I want. I have tried using rlogin in a job, but no luck there either - seems I can't redirect stdin.

rexec appserver -l oracle stop_services

I get further with rexec. The above works interactively, and it prompts for password. I have tried various ways to feed the password in a job.
  #2 (permalink)  
Old 01-30-2002
thehoghunter
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Are there security concerns? If not, double check your info for rsh, rlogin, .rhosts, or /etc/hosts.equiv. You may be missing a simple ingredient to get these commands to work.

If you can't get any of the remote command to work, you could try setting up a cron job on each remote system that waits for a specific file to be ftp'd over - along with a loop, sleep, and if statement which would allow it to stop trying after a specified time.

Or you could check into cfengine - not sure it would do exactly what you want. http://www.iu.hio.no/cfengine/
Just realize that it will make the changes you want and is as unforgiving as other UNIX commands.
  #3 (permalink)  
Old 01-30-2002
Jimbo
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
That did it hoghunter. I created .rhosts and now remsh works great.

And by the way, if I could not get this to work, I had already planned to do just what you suggested - a sleeper job on the remote servers waiting for a file to be ftp'ed over. But it could not be cron since this is an on-demand job, so I'm happy to get this working - launch a single job to do it all.

Thanks!

Last edited by Jimbo; 01-30-2002 at 03:26 PM..
Closed Thread

Bookmarks

Tags
unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0