Automation Action – Execute Secure Shell Command | ThinkAutomation

Automation Action: Execute Secure Shell Command

Execute SSH commands against any host and assign the response to a variable.

Executes a command on a remote SSH Server. Most UNIX/Linux/Mac machines include an SSH Server. The output of the command can be returned to a variable. This action forms part of ThinkAutomation’s broader workflow automation software, enabling automated workflows to securely execute commands on remote servers and use the returned results within subsequent business and IT processes.

Automate Remote Server Commands Using SSH

ThinkAutomation can execute commands on remote systems over Secure Shell (SSH), allowing server and infrastructure tasks to become part of a wider automated workflow. Commands can contain ThinkAutomation variables, enabling the server, command or parameters to change dynamically according to information collected earlier in the automation.

The command response and any errors can be assigned to variables, allowing subsequent actions to analyse the result, make workflow decisions, update other systems or send notifications automatically.

Enter the Host Name IP Address or host name of the server you want to execute the command on.

Enter the Port. This defaults to 22. If no port is specified then the default will be used.

Enter the remote User Name & Password. This user must be allowed to execute remote commands on the host system.

Enter the Command Text to execute.

All entries can use %variable% replacements.

The result of the command can be returned to a variable. Specify the variable from the Assign Response To list.

Any errors generated by the command can also be returned to a variable. Select from the Assign Errors To list.

Showing A Notification On A Mac

The following command will display a notification on a Mac computer:

osascript -e 'display notification "Processed Message %msg_subject%" with title "ThinkAutomation" subtitle "%AccountName%" sound name "Default" '

Speaking Text On A Mac

The following command will speak the given text on a Mac computer:

say "you have received a new message from Think Automation!"
To enable the Remote SSH server on a Mac, use System Preferences – Sharing. Enable the ‘Remote Login’ option.

 

SSH Automation Use Cases

Remote SSH commands can be used to automate server administration, infrastructure checks and other system-level processes. For example, a workflow could check the status of a service, retrieve system information, trigger a remote script, process files on another server or perform an administrative task in response to an incoming message, API request or monitoring event. The returned output can then determine what happens next—for example, logging the result, updating a database or automatically notifying an administrator when a problem is detected.

SSH or PowerShell Automation?

The Execute Secure Shell Command action is designed for running commands on remote systems over SSH. For Windows-based automation, the Execute PowerShell action can run PowerShell commands and scripts directly and return the results to the workflow.

Before executing a remote command, the Ping action can be used to check whether the target server or device is reachable.

This is one action from over 180 actions included with ThinkAutomation. The ThinkAutomation business process automation (BPA) solution is designed to automate on-premises and cloud-based business processes that are triggered from incoming messages. Automate messages received by email, automatic database updates, webhooks, web forms, web chat, SMS messages, Twitter, Teams messages, local files, documents and other messages sources. Create any number of workflow automations using the drag-and-drop low-code designer. Simple fixed pricing, with unlimited message processing reduces overall costs compared to hosted automation solutions.You can also extend ThinkAutomation by creating your own custom automation actions using the built-in designer and C#/VB.net code editor.