termal.in

← Blog

Give an AI agent access to shared hosting — no root, no sudo, no open port

· Termalin Team shared-hostingconnectorai-agentsmcpcpanel

You have a site on cPanel or CloudLinux shared hosting — WordPress, a Laravel app, a static build — and you want to hand it to an AI agent (Claude, ChatGPT, Cursor through Termalin’s hosted MCP) or just reach it from a browser terminal. But you have no root, no sudo, no systemctl, and the provider won’t open an inbound SSH port for you. The usual “install an agent as a service” instructions assume all three. Here’s the path that doesn’t: the Termalin Connector installs as your own user, stays entirely in your home folder, and keeps itself alive with cron.

Why shared hosting is the hard case

Shared hosting is deliberately locked down, and every lock is one an SSH agent normally leans on:

  • No root, no sudo, no service manager — you can’t install a systemd unit.
  • Often no inbound SSH port you control, and a firewall you can’t touch — the provider’s sshd may be on a non-standard port, and usually only port 443 is open outbound.
  • A process reaper that kills long-running background processes when you log out.
  • noexec on /tmp, a hidden /proc (hidepid), a tiny home quota, and a process limit (CloudLinux LVE).

The Connector is built to land inside all of that, because it never needs to listen on a port — it dials out to Termalin over one HTTPS/WebSocket connection and holds it open. Nothing inbound to forward, nothing to scan.

One line, run as your own user

The install command is exactly the one from the cabinet — but you run it without sudo. If the provider’s SSH server isn’t on port 22, point the Connector at it:

curl -fsSL https://termal.in/i/<token> | TERMALIN_TARGET=127.0.0.1:65100 sh

Seeing no root, the installer switches to a user-mode install that changes nothing outside your home directory:

  • The binary lands in ~/.local/bin/termalin-agent (same signature check as a root install), config in ~/.config/termalin-agent/.
  • Trust is a single line. It adds a cert-authority entry to ~/.ssh/authorized_keys and keeps the rest of the file, scoped to your account’s principal and your Unix user — the same limit a root install gets, so a certificate minted for anyone else’s account is refused. You need OpenSSH 5.6+ with key sign-in enabled, which cPanel hosts almost always have.

That’s it — no sshd_config edits (you couldn’t make them anyway), no packages installed.

Cron keeps it alive

With no service manager, the Connector relies on crontab, which shared hosting almost always gives you:

  • It writes an @reboot line and a check every 5 minutes. If the process reaper kills it, the next tick starts it again; a second copy sees the lock file and exits.
  • If cPanel’s “SSH Access” page rewrites ~/.ssh/authorized_keys and drops the trust line, the watchdog puts it back within the hour.

If the account genuinely has no cron, the Connector still runs (it’s started detached with setsid/nohup and survives your shell exiting), but nothing restarts it after a reboot — the install checklist says so plainly.

You update by re-running the installer, still without sudo; automatic updates are opt-in (--auto-update).

Tested against the nasty shared-hosting tricks

These aren’t aspirations — they’re cases in Termalin’s connector install matrix (Connector 0.2.11), each run as an unprivileged user with the provider’s sshd on a non-standard port:

RestrictionResult
/tmp mounted noexecWorks
/proc with hidepid=2 (can’t see other processes)Works
Home on a 16 MB tmpfs (tiny quota)Works (4.7 MB used)
Only outbound port 443 openWorks
Process limit ulimit -u 15 on a 16-core hostWorks — the Connector starts at most 4 worker threads
All of the above at onceWorks
Process reaper kills it (kill -9)Back within 5 minutes via the cron watchdog
Container restartBack via the @reboot line
Home mounted noexecRefused with a clear message (“doesn’t start on this machine … noexec”) — nothing left running

The one hard stop is a home directory mounted noexec: a binary that can’t execute from the only place it’s allowed to live can’t run, so the installer refuses rather than pretend. If that’s your host, the container image is the fallback (below).

What the agent can do — and what it can’t

This is the honest boundary, and it’s a feature: the agent signs in as your unprivileged shell user, so it has exactly the powers you do over SSH, and no more.

Works — everything that lives in your account:

  • Edit files and read logs — fix a .htaccess, a wp-config.php, tail ~/logs/error_log.
  • Run the tools your host ships — wp-cli, composer, git pull, npm run build, a deploy script.
  • Move files over SFTP (text files through the MCP tools — big ones are read in parts, writes up to 5 MB; up to 100 MB in the browser).
  • Encrypted backups of your account’s files to Termalin storage or your own S3 bucket — see server backups.

Doesn’t work — anything that needs root, because you don’t have it:

  • No sudo, no installing system packages, no restarting the web server or PHP-FPM, no touching another user’s files. Ask the agent to “restart Apache” on shared hosting and it will correctly fail — that’s the provider’s job, not yours.

Keyless, bounded, audited

The reason this is safe to leave connected to an AI app:

  • No key on the box. Every login uses a short-lived certificate minted per session, scoped to your account. There’s nothing long-lived in ~/.ssh to steal, and no key in the model’s context to leak.
  • A command policy per Connector. Set it to full, an allowlist of commands, or read-only in the cabinet — enforced before a command runs. On a production site, an allowlist of wp, composer, git and a log tail keeps the agent on its runbook. The thinking behind a good list is in per-host command allowlists for AI agents.
  • Everything in the audit log — every command the agent issues, allowed or refused, with who, what and when. See audit what an AI agent does on your servers.
  • A per-Connector off switch to keep AI apps and API keys off that account entirely.

Connect it in claude.ai or ChatGPT with one sign-in, point Cursor or Codex at the hosted MCP endpoint with an API key, or skip the agent and just open a browser terminal on the account from your phone. The walkthrough for the chat side is manage your servers from Claude or ChatGPT.

If your box runs Docker instead of giving you a bare shell

User-mode on a shell account is one route; a container is the other. If the machine runs Docker — a NAS, a VPS where you do have root, a home lab — the official ~4 MB image is simpler than a user-mode install, and it’s the fallback when home is mounted noexec. See the Connector in Docker and one container that reaches a whole home network.

Honest about the edges

  • You reach the account through Termalin’s hosted side — a browser terminal, the apps, or an AI agent — not with a raw ssh you@host from your own machine.
  • The Connector is a paid feature — Pro or the 14-day trial.
  • Monitoring works over the same link, but a host that hides /proc with hidepid will show less detail than a server you own.
  • The user-mode install is Linux only; it’s the shared-hosting answer, not the Windows one.

Termalin is a free, cross-platform SSH client with a built-in MCP server, per-Connector command rules and a full audit trail — download it, or read the security model. Reaching a shared-hosting account needs Pro or the 14-day trial.

Try it on one host.

Termalin is a fast SSH client for you — and your agents.

Free tier · 14-day Pro trial · pricing

Add Termalin as a preferred source on Google