Run Commands Remotely
Run a command remotely on one or multiple devices. View the command output and save the command to use again later.
Last updated
Run a command remotely on one or multiple devices. View the command output and save the command to use again later.
Last updated
In JFrog Connect, the Remote Commands tool provides a simple solution for running commands remotely on your Linux edge devices.
Connect provides several convenient ways to run commands on your edge devices.
If you just want to run a single command remotely on a single device, you can do this quickly on the Details Panel of the Devices page.
If you want to run several commands in succession, or run a command along with other operations on the edge device, create an update flow that uses the Run Command action block.
If you want to run a single command remotely on multiple devices, you can do it from the Remote Commands page. This article describes how to create and run commands from the Remote Commands page.
You can create Bash commands, run them on devices you select, and save the commands for later use. After running a command, you will be able to view its output.
By default, Connect runs the commands on your edge device as a Linux root user. If you want the commands to run as non-root, see Run Commands as Non-root User.
To enter and run a command, do the following:
Go to the Remote Commands page and enter a Bash command in the Command field. Click Run Command.
Using groups and/or additional filters, select the device(s) to receive the command.
View the number of devices affected by the filter you applied. If this does not look right, you can go back and reset your device filter. Once you are satisfied with the filter applied, run the command.
After you have run a command, you can scroll down the Remote Commands page to see the Executed Commands. For each command, the table shows a separate row for each device that received the command.
To see the full output of the command on a specific device, click View Output on the right side of the table. A popup with the output information like the example below will appear.
Connect comes with a number of commands ready to use. If you want to use one of these commands or a command that you have added and saved, do the following:
Go to the Remote Commands page. Find the command in the list of commands and click the green arrow. If you don’t see the command in the list displayed, use the Search to find the command.
Select the groups and/or filters of the device(s) to receive the command and run the command.
To add a new Bash command, do the following:
Go to Remote Commands and click Add New Command.
Enter a name that will help you remember the command, enter the Bash command, and save.
The command will appear in the list of Saved Commands, and you can reuse it whenever you need it. The command will also be available in the list of Control Commands on the details panel of the Devices page.
You don’t want to run commands on your device as root user? Learn how to Run Commands as a Non-root User.