-
Notifications
You must be signed in to change notification settings - Fork 0
VPS Deployment
hooks/vps-deploy.sh installs the RedLog shell hook on a remote box and opens
a reverse SSH tunnel so every command run there lands in the local chain in
real time. Same code path as the local hook — it just POSTs to
127.0.0.1:6660 from the VPS side, which routes back to the operator's
machine through -R.
- RedLog running locally with an open project (so
~/.redlog/api-token+~/.redlog/api-portexist). - SSH access to the VPS (key-based auth recommended so the tunnel doesn't break on the reverse leg).
-
bash,curl, andpython3on the VPS (needed byshell-preexec-hook.sh).
One-time copy. Scp's the hook to ~/.redlog-hook.sh, writes
~/.redlog/api-token (mode 600) and ~/.redlog/api-port=6660, and appends
source ~/.redlog-hook.sh to the operator's .bashrc and .zshrc if not
already there.
./hooks/vps-deploy.sh install operator@vps.example.comForeground ssh -R 6660:127.0.0.1:6660 operator@vps.example.com. Every
command you run on the VPS during this session hits the local RedLog chain
through the tunnel. Server-alive interval 30s / count 3 keeps the tunnel
from silently dropping on flaky links.
./hooks/vps-deploy.sh tunnel operator@vps.example.comExit the ssh session (Ctrl-D) to close the tunnel.
Removes ~/.redlog-hook.sh, ~/.redlog/api-token, ~/.redlog/api-port, and
strips the source line out of .bashrc / .zshrc.
./hooks/vps-deploy.sh uninstall operator@vps.example.comSame events as the local hook — shell.command_start and shell.command_end
with source: 'builtin-terminal' and terminalId reflecting the VPS
identity, plus:
-
data.host— hostname of the VPS (fromuname -n) -
data.user— remote user -
data.cwd— remote cwd at command_end -
data.exit_code,data.duration_secas usual
The interactive-ssh pivot event
already fired locally when you ran the ssh line, so the timeline shows the
transition into and out of the VPS session.
- Windows / PowerShell VPS: only bash/zsh hooks are packaged in the install step.
-
Multi-hop pivot (VPS → target through another VPS): each hop needs its
own
install+ reverse tunnel; the local API only listens on 6660 so both legs bind to the same port and the second hop's tunnel wins. - Ephemeral VPS on-boot install: bake the hook into your cloud-init / user-data if the VPS is short-lived.
-
hooks/vps-deploy.sh— script source. -
SSH & Session Replay — the non-hook approach (session
replay from local
.cast). - Hook Privacy — how the exclusion list interacts with remote-tunnel events (recording gate still applies).
Integration
Evidence
SSH / VPS
Extending
Privacy
Agent skill
Ops