HP Insight Control for Linux 6.0 User Guide

The -w option enables you to specify a range of managed systems or a specific managed
system.
DescriptionCommand line
Runs the hostname command on the first five managed systems
in the collection.
IMPORTANT: You must use the Insight Control for Linux internal
name (which is based on the Insight Control for Linux collection
name) when you specify a range of managed systems. In the
example, icelx is the Insight Control for Linux internal name.
# pdsh -w icelx[1-5] hostname
earth: earth.example.com
eris: eris.example.com
mercury: mercury.example.com
mars: mars.example.com
pluto: pluto.example.com
Runs the uptime command on a specific managed system. In the
example, mercury is the real host name
# pdsh -w mercury uptime
For more information, see pdsh(1) and the following website:
http://sourceforge.net/projects/pdsh/
19.4 Using HP Insight Control for Linux to run commands and scripts
through SSH
The following menu items enable you to run a script or command through SSH to one or more
managed systems:
ToolsCommand Line ToolsRun SSH Command...
ToolsCommand Line ToolsRun Script...
19.4.1 Running an SSH command
The ToolsCommand Line ToolsRun SSH Command... runs a command on a target server.
This tool operates on the target server by opening a secure shell (SSH) connection to the target
server, running the command, capturing Stdout and Stderr from the command, capturing the
return code from the command, and closing the SSH connection.
You must define SSH credentials into HP SIM for the target server in order to use this menu
item.
Select the following menu item from the HP Insight Control user interface to update the SSH
Settings for one or more target managed systems:
OptionsProtocol SettingsSystem Protocol Settings
IMPORTANT: Any HP SIM user that has access to this tool is able to run any command on the
target managed system with the privileges of the user you entered into the System Protocol
Settings page. If you entered the root user and password into the System Protocol Settings,
any HP SIM user with access to this tool also has root privileges on the target managed system.
To run an SSH command on one or more managed systems, follow this procedure:
1. Before you begin, ensure that the command you intend to run does not leave any open file
descriptors upon completion (including called scripts).
Open file descriptors might prevent the SSH connection from closing properly and might
cause the task to remain in a Running state indefinitely.
2. Select the following menu item from the HP Insight Control user interface:
ToolsCommand Line ToolsRun SSH Command...
3. Select one or more target managed systems.
19.4 Using HP Insight Control for Linux to run commands and scripts through SSH 199