![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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. |
|
||||
|
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. |
|
||||
|
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.. |
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|