- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Executing command on Remote System
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
Discussions
Discussions
Discussions
Forums
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
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
тАО06-24-2003 09:58 PM
тАО06-24-2003 09:58 PM
I want to execute command on several remote systems. Without modifying the hosts etc. files, how I can accomplish this? The concern is, the password can not be supplied with the rlogin or rexec command.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:16 PM
тАО06-24-2003 10:16 PM
Re: Executing command on Remote System
As indicated I can not modify any files and needs to execute the command without any modification to the files on the target server. Any other alternatives?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:20 PM
тАО06-24-2003 10:20 PM
Re: Executing command on Remote System
root in hosta want to execute command on hostb, you can edit the .rhosts in hostb:
hosta root
Now things are done!!!
-ux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:23 PM
тАО06-24-2003 10:23 PM
Re: Executing command on Remote System
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:23 PM
тАО06-24-2003 10:23 PM
Re: Executing command on Remote System
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:29 PM
тАО06-24-2003 10:29 PM
Re: Executing command on Remote System
Or you must offer the password when use r* command!
Of course, a hacker can ......
:p
-ux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:31 PM
тАО06-24-2003 10:31 PM
Re: Executing command on Remote System
See the man pages for the following:
# man 4 hosts.equiv
# man rcp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:33 PM
тАО06-24-2003 10:33 PM
Re: Executing command on Remote System
But if you like playing with C and libraries of C you can by using rcmd() function but this should be run as root.
But hide this program if you write its very dangerous...
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:36 PM
тАО06-24-2003 10:36 PM
Re: Executing command on Remote System
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:46 PM
тАО06-24-2003 10:46 PM
Re: Executing command on Remote System
Hi,
1.What do you mean "properly"? Can you rlogin from SUN to HP-UX without a password?
2.If so, you can do nothing ,just use
#rexec HOST_OF_HP-UX command-in-hp-ux
Have a good day!
-ux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:47 PM
тАО06-24-2003 10:47 PM
Re: Executing command on Remote System
I presume you are looking to use the rcp or remsh commands??
When you say access, I presume you mean you can telnet or ssh to from hpux to sun server??
Remotely executing commands (remsh) relies on having either a .rhosts or /etc/hosts.equiv file.
As far as I am aware there is no way around this.
If you explain what you are trying to achieve i.e. what commands you are trying to run or what files you want to copy, then someone may be able to offer a solution.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 10:56 PM
тАО06-24-2003 10:56 PM
Re: Executing command on Remote System
Sorry to confuse with "Sun". This is not Sun Solaris but the host name "sun". Let me further explain this:
User1
Host1
Host2
User1 wants to execute some commands e.g., #find /home/sanjay -size 10c -exec rm {} \; on host2 using a script created on host1.
Con is right is some extent but I want to achieve this without modifying and .rhosts file etc.
Hope this gives you a much clear picture.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 11:16 PM
тАО06-24-2003 11:16 PM
Re: Executing command on Remote System
Sorry if I'm missing your point.
If you want to execute that find command from host1 on host2 then you need to use the remsh command. This relies on having a .rhosts or /etc/hosts.equiv.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2003 11:19 PM
тАО06-24-2003 11:19 PM
Re: Executing command on Remote System
Script on host1 must be available first on host2. Then, if you don't want to have a .rhosts file, use a rexec command, but you will be prompted for the password on host2 before each execution.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2003 03:48 AM
тАО06-25-2003 03:48 AM
Re: Executing command on Remote System
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2003 05:33 AM
тАО06-25-2003 05:33 AM
Re: Executing command on Remote System
http://hpux.cs.utah.edu/hppd/hpux/Tcl/expect-5.38/
(depends on tcltk being installed as well).
You can have expect send the password to rexec when prompted.
Be aware that all of these approaches have security issues; mainly, your password is embedded in a script and sent in clear-text over the network.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2003 05:49 AM
тАО06-25-2003 05:49 AM
Re: Executing command on Remote System
you can think of using ssh or openssh.
It let's you configure equivalence of users, without modifying existing file.
You will have to install ssh on each hosts, and configure it, but your .rhosts will not be modified.
Otherwise expected seems the best choiche, as pointed out.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2003 05:57 AM
тАО06-25-2003 05:57 AM
Re: Executing command on Remote System
Since it appears that all you want to do is script; install secure shell on both (or all systems, then configure it according to the document I've attached. This will allow you to securely access remote systems, run commands and display/capture data back to the intiating system.
The only caveat is that the initial connection between systems is slow (in HPux versions prior to 11i). After the initial connection/handshake is made, it is just as fast as remsh, rlogin, rcp, or any of the others.
Just be careful to check permissions and ownerships, as outlined in the document. It'll work GREAT!
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2003 11:27 AM
тАО06-25-2003 11:27 AM
Re: Executing command on Remote System
If you will use the ssh you can execute
the ssh command (not remsh) and if you
not alowed user connect automaticly it will
ask for password and if it's good execute the command.
So start using ssh.
Caesar