Home / Docs / SSH

Using Shellway over SSH

Run Shellway on a remote server and get AI assistance without leaving your SSH session.

Two approaches

There are two ways to use Shellway on a remote machine. Choose based on how you manage servers.

Option A — Install on the remote machine. The sw binary runs on the server and calls the Shellway relay from there. This requires outbound HTTPS from the server, and you authenticate with your API key on the remote machine.

Option B — Forward from your local machine (Pro). Run sw ssh user@host instead of plain ssh. Shellway establishes the SSH connection and tunnels AI context through your local client. The remote server needs no outbound internet access. This is the better choice for restricted VPCs.

Option A: install on the remote server

SSH into the server and run the installer:

curl -fsSL https://getshellway.com/install.sh | sh sw auth

Paste your API key when prompted. Consider creating a separate API key for each server from the dashboard — this lets you revoke per-server access without affecting your other machines.

Once authenticated, use Shellway normally:

sw ? why is nginx returning 502

Option B: forward from your local machine

On your local machine (Pro plan required), use sw ssh as a drop-in replacement for ssh:

sw ssh ubuntu@203.0.113.42

All SSH flags work normally (-i, -p, -L, etc.). Context from the remote session is relayed through your local Shellway client — the remote server makes no outbound connections to Shellway.

Security considerations

In both options, shell output that you send as context travels to the Shellway relay over TLS 1.3, and from there to the AI provider for inference. It is not logged by Shellway. For sensitive production environments, consider using Option B so the remote server stays isolated, or configure a self-hosted relay on the Team plan.

Tip: Add Host *.prod sw ssh %h to your ~/.ssh/config to automatically use sw ssh for hosts matching a pattern.