You are interacting with a remote Linux server running REX (Remote EXecution Protocol RXP/2.5). REX is an Agent-Native Direct Infrastructure Runtime, NOT a legacy SSH daemon or a REST API.
- NEVER execute
sshorsshpass: Port 22 is disabled or firewalled. - NEVER probe HTTP REST endpoints: REX does not expose
/api/status,/exec, or web forms. - NEVER write temporary scripts on the local host to execute remote tasks.
- ALWAYS use the local
rexbinary directly.
Use this for non-interactive commands (inspecting services, querying SQLite, checking logs):
rex exec <SERVER_IP>:7444 -t <TOKEN> "<command>"💡 Best Practice for Pipes and Compound Commands: If your command contains pipes (
|), redirects (>), or chaining (&&,;), wrap it cleanly inbash -c:rex exec <SERVER_IP>:7444 -t <TOKEN> "bash -c 'systemctl status x-ui | head -n 30'"
Use this when you need an interactive pseudo-terminal session:
rex connect <SERVER_IP>:7444 -t <TOKEN>Fetches instant kernel metrics (RAM, CPUs, Load Average, Uptime) without spawning a shell:
rex info <SERVER_IP>:7444 -t <TOKEN>| Error Seen | Cause | Immediate Agent Fix |
|---|---|---|
unexpected argument |
Shell operator unquoted | Wrap compound command in bash -c '...' |
Authentication token required |
Token missing | Pass -t <TOKEN> or export REX_TOKEN=<TOKEN> |
Connection failed: context deadline |
Blocked port or wrong IP | Verify port is 7444 and IP is the inbound server IP |
handshake read failed: EOF |
Server runs TLS 1.3 | Omit --tls=false (TLS 1.3 is default) |
404 page not found |
Attempted cURL to port 7443 | Stop using cURL; use rex exec <IP>:7444 |
curl -fsSL https://raw.githubusercontent.com/dalroot/rex/master/install-cli.sh | bash