feat: add quick command reference to guide, SSH support, and handoff doc
- Add copy-paste command reference card to guide.html Linux section - Add enable-ssh.sh standalone script for remote access on Live USB - Add optional SSH install prompt to setup-openclaw.sh - Add HANDOFF.md for Mac mini Claude Code remote takeover Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
31
bootable/linux-setup/enable-ssh.sh
Normal file
31
bootable/linux-setup/enable-ssh.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# ============================================================
|
||||
# Enable SSH server on Ubuntu Live USB
|
||||
# Usage: sudo bash enable-ssh.sh
|
||||
# ============================================================
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "Usage: sudo bash enable-ssh.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing OpenSSH server..."
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq openssh-server
|
||||
|
||||
systemctl enable ssh
|
||||
systemctl start ssh
|
||||
|
||||
REAL_USER="${SUDO_USER:-$USER}"
|
||||
echo ""
|
||||
echo "Set a password for SSH login (user: $REAL_USER):"
|
||||
passwd "$REAL_USER"
|
||||
|
||||
LOCAL_IP=$(ip -4 addr show | grep -oP '(?<=inet\s)(?!127\.)\d+\.\d+\.\d+\.\d+' | head -1)
|
||||
echo ""
|
||||
echo "========================================"
|
||||
echo " SSH Ready!"
|
||||
echo " From Mac mini or other computer:"
|
||||
echo " ssh ${REAL_USER}@${LOCAL_IP}"
|
||||
echo "========================================"
|
||||
@@ -185,6 +185,23 @@ if [[ "$AUTOSTART" =~ ^[Yy]$ ]]; then
|
||||
echo " Autostart enabled."
|
||||
fi
|
||||
|
||||
# ── Optional: Install SSH for remote management ──
|
||||
echo ""
|
||||
read -rp "Install SSH server for remote access? (y/N): " INSTALL_SSH
|
||||
if [[ "$INSTALL_SSH" =~ ^[Yy]$ ]]; then
|
||||
echo " Installing OpenSSH server..."
|
||||
apt-get install -y -qq openssh-server > /dev/null 2>&1
|
||||
systemctl enable ssh
|
||||
systemctl start ssh
|
||||
echo ""
|
||||
echo " Set a password for SSH login (user: $REAL_USER):"
|
||||
passwd "$REAL_USER"
|
||||
LOCAL_IP=$(ip -4 addr show | grep -oP '(?<=inet\s)(?!127\.)\d+\.\d+\.\d+\.\d+' | head -1)
|
||||
echo ""
|
||||
echo " SSH enabled! Connect from another computer:"
|
||||
echo " ssh ${REAL_USER}@${LOCAL_IP}"
|
||||
fi
|
||||
|
||||
# ── Set ownership ──
|
||||
chown -R "$REAL_USER:$REAL_USER" "$INSTALL_DIR/data"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user