Previous Topic: dpmrpt schedulereport Command--Schedule a ReportNext Topic: Help Desk Commands


dpmssh run Command--Run Remote Shell Commands or Scripts

The dpmssh run command allows remote login and execution of shell commands or scripts on a target Linux or UNIX system using Secure Socket Shell (SSH) for secure communication.

This command has the following format:

dpmssh run -cmdline commandline -target_host targethostname -target_user targetusername -target_password targetpassword [-pre] [-post] 
-cmdline commandline

Defines the shell command or path where the script file that you want to run is located.

-target_host targethostname

Defines the name of the target Linux or UNIX host server.

-target_user targetusername

Defines the user name for the target Linux or UNIX host server.

-target_password targetpassword

Specifies the user password for the target Linux or UNIX host server.

-pre

(Optional) Specifies whether to generate an event before the operation is performed.

-post

(Optional) Specifies whether to generate an event after the operation is performed.

Example: Run a Shell Command and Create Events

This example runs the ls command against the /tmp directory.

dpmssh run -cmdline "ls /tmp" -target_host linuxserver -target_user myusername -target_password pswd -pre -post

Example: Run a Remote Script

This example runs the script named MyScript.

dpmssh run -cmdline "/tmp/MyScript.sh" -target_host unixbox -target_user root -target_password pass1