-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathssh-openclaw.sh
More file actions
executable file
·22 lines (17 loc) · 855 Bytes
/
Copy pathssh-openclaw.sh
File metadata and controls
executable file
·22 lines (17 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# Opens an interactive bash shell inside an OpenClaw gateway container on VPS.
#
# Usage:
# scripts/ssh-openclaw.sh # auto-detect instance
# scripts/ssh-openclaw.sh --instance main-claw # target specific instance
set -euo pipefail
printf '\033[32mSSH into OpenClaw container \033[0m\n'
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/lib/source-config.sh"
source "$SCRIPT_DIR/lib/resolve-gateway.sh"
GATEWAY=$(resolve_gateway "$@") || exit 1
printf '\033[32mStarting bash session in %s container \033[0m\n' "$GATEWAY"
printf 'OpenClaw CLI:\033[33m openclaw \033[0m \n'
printf 'Example: openclaw security audit --deep \n'
TERM=xterm-256color ssh -t -i "${ENV__SSH_KEY}" -p "${ENV__SSH_PORT}" "${ENV__SSH_USER}@${ENV__VPS_IP}" \
"sudo docker exec -it -u node $GATEWAY bash"