812 B
812 B
Remote Assist
macOS 远程协助一键脚本。启用 SSH + Cloudflare Quick Tunnel,让远程 Agent 可以 SSH 进来帮忙。
使用
被协助方执行:
bash <(curl -fsSL https://git.shazhou.work/scottwei/remote-assist/raw/branch/main/remote-assist.sh) "ssh-ed25519 AAAA..."
参数是协助者的 SSH 公钥。脚本会:
- 将公钥加入
~/.ssh/authorized_keys - 开启 macOS Remote Login (sshd)
- 安装并启动 Cloudflare Quick Tunnel
- 打印连接信息(隧道地址 + 用户名)
协助者连接
# 1. 启动本地代理
cloudflared access tcp --hostname <tunnel-host> --url localhost:2222
# 2. SSH(另一个终端)
ssh -p 2222 <username>@localhost
要求
- macOS(Intel / Apple Silicon)
- 管理员密码(用于开启 Remote Login)