- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- remote command execution
Operating System - HP-UX
1821801
Members
3049
Online
109637
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО12-02-2002 12:57 PM
тАО12-02-2002 12:57 PM
I need to execute a custom command on a remote machine. remsh seems to be the most likely command but I think I am running into the terminal issue mentioned in the man page. If I telnet to the remote host, everything works fine and I get a formatted output. Is there another command to use? Also a question about the execution environment. When you use remsh for a specific user, does the command run in the environment of that user?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-02-2002 01:14 PM
тАО12-02-2002 01:14 PM
Re: remote command execution
It would help to know what you are trying to do remotely. The environment used by remsh is not the same as the environment on the original machine. A simple way to show this would be to add a path to an executable to your $PATH on the local machine, then try to run the same command using remsh.
I think remsh is usually the way to go. You must specify absolute paths to non-system commands (I usually specify the complete paths to system commands as well). If it is output you are not seeing on the screen, maybe you need to re-direct the output to a file.
Theresa
I think remsh is usually the way to go. You must specify absolute paths to non-system commands (I usually specify the complete paths to system commands as well). If it is output you are not seeing on the screen, maybe you need to re-direct the output to a file.
Theresa
This is my easy job!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-02-2002 01:47 PM
тАО12-02-2002 01:47 PM
Solution
remsh does not login like telnet. Therefore, nothing in /etc/profile or .profile is run so the environment is nothing like a telnet connection.
remsh is typically used as a batch command to gather information or to kick off some process remotely (ie, remsh remote-cpu bdf), but as the man page suggests, it doesn't work for interactive commands like vi. And if the application expects to see a terminal with fancy features, you'll have to export that on the command line something like this:
remsh remote-cpu export TERM=hpterm /path/to/appicaltion optional-parameters...
Bill Hassell, sysadmin
remsh is typically used as a batch command to gather information or to kick off some process remotely (ie, remsh remote-cpu bdf), but as the man page suggests, it doesn't work for interactive commands like vi. And if the application expects to see a terminal with fancy features, you'll have to export that on the command line something like this:
remsh remote-cpu export TERM=hpterm /path/to/appicaltion optional-parameters...
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-02-2002 03:47 PM
тАО12-02-2002 03:47 PM
Re: remote command execution
The ability of this process to run had everything to do with setting up the proper environment. I took the relevant lines from /etc/profile and the users .profile and created a new file to be read before execution.
I redirected the standard out to /dev/null since the program that will launching this does not need this information. Now the results
are the same as if the user on the remote machine had run this directly.
remsh nimbus -l poller '. /optim/bin/.remsh_env;/optim/bin/OptimExtract --modules=product > /dev/null'
Thanks to all for pointing me in the right direction.
I redirected the standard out to /dev/null since the program that will launching this does not need this information. Now the results
are the same as if the user on the remote machine had run this directly.
remsh nimbus -l poller '. /optim/bin/.remsh_env;/optim/bin/OptimExtract --modules=product > /dev/null'
Thanks to all for pointing me in the right direction.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP