- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: rlogin question
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
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
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
04-04-2003 06:54 AM
04-04-2003 06:54 AM
rlogin question
How can i include a rlogin command or what is the correct syntax in a local script that will be able to execute/run commands on the remote host?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 06:57 AM
04-04-2003 06:57 AM
Re: rlogin question
I think remote shell (remsh) is more suitable in your case.
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 06:58 AM
04-04-2003 06:58 AM
Re: rlogin question
You might want to take a look at the 'remsh' command. You can do this:
remsh remotehost '/bin/ls somefile*'
or something like that. You'll have to have the .rhosts setup between the systems, which leaves open a security risk, but it will work.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 06:58 AM
04-04-2003 06:58 AM
Re: rlogin question
take a look at next command,
# man rexec
# rexec host [-l username] [-n] command
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 06:59 AM
04-04-2003 06:59 AM
Re: rlogin question
Use remsh.
remsh remote_host -l loginname -n your_command
If the local login and the remote login are the same, you can exclude '-l loginname' in the above command.
Just a friendly reminder that using 'r' commands is a security concern.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 07:00 AM
04-04-2003 07:00 AM
Re: rlogin question
Do you have an example of how i could use it? Man pages not that helpfull?
What I want 2 do is in a script on hosta remote login to hostb & shutdown an app & database?
Any ideas?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 07:04 AM
04-04-2003 07:04 AM
Re: rlogin question
# remsh remotemachine ls
Will do an ls on the remote machine.
Do a 'man remsh' for more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 07:09 AM
04-04-2003 07:09 AM
Re: rlogin question
Write a script on hostB to shutdown the application and the database on it. (say /home/appadmin/shutdown.sh
From hostA do
remsh hostB /home/appadmin/shutdown.sh
Make sure on hostB, you have the .rhosts file of the account that runs the script, setup properly for hostA.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 07:14 AM
04-04-2003 07:14 AM
Re: rlogin question
Thanks for all the insight, its most appreciated!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2003 07:18 AM
04-04-2003 07:18 AM
Re: rlogin question
Sridhar has clearly described how to do it. one more thing to notice is, you better have same userID on both hosts, otherwise, you have to use "remsh hostb -l user_name script_name"
thanks,
Gary