GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: remote shell help
Operating System - HP-UX
1845904
Members
4329
Online
110250
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
Forums
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
04-23-2003 11:15 AM
04-23-2003 11:15 AM
remote shell help
We have about hundreds hp and sun mixed servers, and we want to run a command, ex, top command on each one of systems, and get the result back.
Can anybody please help me out on ksh scripting?
Thanks,
Can anybody please help me out on ksh scripting?
Thanks,
none
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 11:39 AM
04-23-2003 11:39 AM
Re: remote shell help
Hi,
There is no top command as default in Solaris (but it exist as freeware).
It is not hard to write a script which read a list of hosts (for example from a file, and do a remsh (or rsh if Solaris) to the hosts, but yith hundreds of hosts I don't think it is very useful.
while read host os
do
if [ os == Solaris ]
then
rsh $host
else
remsh $host
fi
done
There is no top command as default in Solaris (but it exist as freeware).
It is not hard to write a script which read a list of hosts (for example from a file, and do a remsh (or rsh if Solaris) to the hosts, but yith hundreds of hosts I don't think it is very useful.
while read host os
do
if [ os == Solaris ]
then
rsh $host
else
remsh $host
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 11:57 AM
04-23-2003 11:57 AM
Re: remote shell help
Sorry,
There was an error. It should be
if [ os = Solaris ]
And the host where the script is run must be in the /etc/hosts.equiv or .rhosts file on all remote hosts.
There was an error. It should be
if [ os = Solaris ]
And the host where the script is run must be in the /etc/hosts.equiv or .rhosts file on all remote hosts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 12:53 PM
04-23-2003 12:53 PM
Re: remote shell help
First, I strongly recommend setting up ssh for this, along with public/private key authentication. Then your can easily execute commands remotely, as well as copy files to hosts. See the ssh, ssh-keygen, ssh-agent and ssh-add man pages for this.
Solaris 9 has ssh included; Solaris 8 has it available at www.sunfreeware.com (openssh, which requires openssl, zlib and libgcc or gcc-3.2.2).
HP-UX has ssh available at
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA
or you can get the depot and source at
http://hpux.cs.utah.edu
For the script, create a file with the host names. The, in your script, do:
for i in `cat /path/to/hostnames/file`
do
echo $I # print current host
ssh $i $*
done
call it as
hostcmd
Solaris 9 has ssh included; Solaris 8 has it available at www.sunfreeware.com (openssh, which requires openssl, zlib and libgcc or gcc-3.2.2).
HP-UX has ssh available at
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA
or you can get the depot and source at
http://hpux.cs.utah.edu
For the script, create a file with the host names. The, in your script, do:
for i in `cat /path/to/hostnames/file`
do
echo $I # print current host
ssh $i $*
done
call it as
hostcmd
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
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP