Creating an openssh task through the cli, Creating an openssh task – HP Systems Insight Manager User Manual
Page 344
![background image](/manuals/397204/344/background.png)
Copying the public key from HP SIM to the target systems
After OpenSSH is installed, create another script to copy the dtfsshkey.pub file (the public key) from the
HP SIM server to the .ssh directory of the home directory of the administrator user on the target system.
1.
Copy the .dtfSshKey.pub file from ..\Program Files\HP\Systems Insight
Manager\config\sshtools\
folder on the HP SIM server to a local folder on the deployment server,
and rename .dtfSshKey.pub to authorized_keys2.
a.
Create a new job.
b.
Add a Run Script task to the job by clicking Add >> Run Script.
c.
Ensure that the Run this script option is selected.
d.
In the box below Run this script, enter the following (assuming that administrator’s home directory
is C:\Documents and Settings\Administrator):
cd C:\Documents and Settings\Administrator\
mkdir .ssh
cd .ssh
del * /q
e.
Select the Windows option in the In which OS would you like to run this script? section.
f.
Enter the complete path where you have the authorized_keys2 file as the Source path:. For
example, if authorized_keys2 is in folder C:\temp\OpenSSH, enter source path as
C:\temp\OpenSSH\authorized_keys2
.
g.
Enter the location where you want this file to be copied on the target server under the Destination
path:
. For example, if the administrator’s home directory is C:\Documents and
Settings\Administrator
, enter the destination path as C:\Documents and
Settings\Administrator\.ssh\authorized_keys2
.
h.
Click Finish.
i.
Add a Run Script task to the job by clicking Add >> Run Script.
j.
Ensure that the Run this script option is selected.
k.
In the box below Run this script, enter the following command:
net stop opensshd
net start opensshd
l.
Select the Windows option in the In which OS would you like to run this script? section.
m.
Click Finish.
2.
Drag this event and drop it on the target system where you want OpenSSH to be configured.
Related procedures
•
•
Initial ProLiant Support Pack Install
•
Creating an OpenSSH task through the CLI
Creating an OpenSSH task through the CLI
Perform this procedure to create an OpenSSH task through the command line using the mxtask command
in two ways:
•
Entering all parameters through the command line
•
Entering all parameters through an .XML file
NOTE:
Tasks created from an .XML file are disabled when viewed in the task list. Tasks created from the
command line are not disabled when viewed from the task list.
Creating an OpenSSH task
1.
To see how to enter the information correctly, export an existing OpenSSH task.
344 Tools that extend management