Run Command on a server
With Run Command you install a small agent on your server, and from then on you can run commands on that server: from the panel, with an API token, or through your AI assistant. For example, in Claude or ChatGPT you write "update the packages on my server", and the assistant shows you the command it wants to run, runs it on the server once you say yes, and reports the result.
It is available for cloud servers and virtual servers (VPS), and stays off until you turn it on.
How your AI assistant uses it
When your assistant is connected to your account through the Arianet MCP server and you have granted it the "Run commands on a server" permission, it has two tools:
server_agent_status: reads a server's agent state (enabled, online, operating system and hostname).run_command: runs a command on the server and returns its output and exit code.
Before every run the assistant shows you the exact command in the chat and runs it only after your explicit yes. Dangerous commands (such as wiping the whole disk, formatting or overwriting a disk, shutting down or rebooting the server, flushing the firewall rules, changing the SSH configuration, changing a password or deleting a user, and running a script downloaded from the internet) additionally need your approval in the Arianet panel, like the other irreversible actions.
Enabling it and installing the agent
-
Open the server's page: for a cloud server "Cloud ← Servers ← server name", for a VPS "My services ← server name". The Run Command card is on the Overview.
-
Click Enable. The panel shows a one-time install command, valid for 15 minutes:
curl -fsSL https://agent.ariaservice.net/install.sh | sudo sh -s -- aet_... -
Copy it with the Copy button and run it as root on that same server, over SSH or the console.
-
The agent installs, starts as a systemd service and connects to Arianet. The card switches to Online without a page reload and shows the operating system, hostname, agent version and last-seen time.
Notes:
- The install command works only on that server: the public IP address the agent connects from must be one of that server's IPs.
- If 15 minutes have passed or you lost the command, click Enable again for a fresh one.
- The agent only opens an outbound connection (HTTPS on port 443) to
agent.ariaservice.net; you do not open any port on the server.
Agent states
| State | Meaning |
|---|---|
| Disabled | The agent is not installed, or was removed. |
| Waiting for install | An install command was issued but the agent has not connected yet. |
| Online | The agent is connected and runs commands. |
| Offline | The agent is installed but not connected right now: the server is off, its network is down or the agent service is stopped. |
Supported operating systems
- Ubuntu
- Debian
- AlmaLinux
- Rocky Linux
The agent runs on x86-64 and ARM64 with systemd.
Running a command from the panel
While the agent is online you can type a command in the same card and click Run. The panel shows the command once more and runs it after you confirm.
- The command runs as root through
/bin/sh -c. - The default time limit is 2 minutes (up to 15 minutes through the API).
- A command can be up to 8 KiB; up to 64 KiB of each output stream (stdout and stderr) is kept.
- Do not run interactive commands (such as
topor a text editor): they get no input and run until the time limit.
Command history
The bottom of the card lists every command run on this server, page by page: the command, who ran it (panel, API or AI), the exit code, the time (date, then time) and how long it took. "Output" shows that command's full output.
Every command is also recorded in the account activity log: the full command text, who ran it and how (panel, an API token, or which AI connection), the exit code, the duration and the output size. Enabling and removing the agent are recorded too.
Security model
- Outbound only: the agent connects to Arianet itself; no inbound port is opened on the server and Arianet keeps no SSH key or password of your server.
- No password or key is given to the AI: the assistant sends commands only through the Arianet API, with the permissions you granted.
- Every command confirmed in the chat: the assistant shows the exact command before running it and waits for your yes.
- Panel approval for dangerous commands: commands that can break the server or change who can get in run only after you approve them in the panel.
- Everything is logged: every command, successful or not, stays in the history and the activity log with its details.
- A separate credential per server: each agent holds only its own server's key, and "Disconnect and remove agent" revokes it at once.
- Off by default: neither on the server, nor in API tokens, nor in AI connections is this permission given without your explicit choice.
Disconnecting and removing the agent
In the Run Command card click Disconnect and remove agent and type the server's name to confirm. From that moment no command runs on this server. If the server is on and the agent connected, the agent removes itself; if the server is off, it is removed the next time it connects.
To remove it by hand on the server:
sudo arianet-agent uninstall
To enable it again, click Enable and run the new install command.
Permissions (scopes)
| Scope | Allows |
|---|---|
servers:exec:read | Reading the agent state, the command history and the commands' output |
servers:exec | Running commands, enabling and removing the agent (includes servers:exec:read) |
Neither is part of any preset: not "View only" or "Full management" on the assistant's consent page, not the "Read only" button for API tokens, and not a token created with "Full access". You tick "Run commands on a server" yourself on the assistant's consent page or when creating an API token. A warning is shown next to it: whoever holds this permission can run any command as root on the servers where the agent is enabled.
In the IAM of organization accounts these permissions are the exec:view and exec:run actions.
API
For API tokens the same actions live under the /exec/v1 prefix ({product} is cloud or vps):
| Method | Path | Does |
|---|---|---|
GET | /exec/v1/servers/{product}/{server_id}/agent | Agent state |
POST | /exec/v1/servers/{product}/{server_id}/agent/enroll | Issue an install command (15 minutes) |
DELETE | /exec/v1/servers/{product}/{server_id}/agent | Disconnect and remove the agent |
POST | /exec/v1/servers/{product}/{server_id}/commands | Run a command: {"command": "...", "timeout_seconds": 120, "wait_seconds": 30} |
GET | /exec/v1/commands/{id} | A command's state and output |
GET | /exec/v1/servers/{product}/{server_id}/commands?page=1 | Command history (without output) |
Running a command accepts an Idempotency-Key header. A command that does not finish within the wait comes back as running; read the result with GET /exec/v1/commands/{id}. If the agent is not connected the answer is 409 with code agent_offline, and if Run Command is not enabled on the server it is 404 with code agent_not_enabled.