Add SSH setup page for Linux remote control
Simple one-page guide at u-claw.org/ssh.html with copy-paste commands for enabling SSH on Ubuntu Live USB. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
71
website/ssh.html
Normal file
71
website/ssh.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>U-Claw Linux SSH 远程控制</title>
|
||||
<style>
|
||||
body { font-family: -apple-system, sans-serif; max-width: 600px; margin: 40px auto; padding: 0 20px; background: #1a1a2e; color: #eee; }
|
||||
h1 { text-align: center; }
|
||||
.step { background: #16213e; border-radius: 12px; padding: 20px; margin: 20px 0; }
|
||||
.step h2 { color: #e94560; margin-top: 0; }
|
||||
.cmd { background: #0f3460; padding: 15px; border-radius: 8px; font-family: monospace; font-size: 16px; position: relative; word-break: break-all; user-select: all; cursor: pointer; }
|
||||
.cmd:active { background: #1a5276; }
|
||||
.copy-btn { position: absolute; right: 8px; top: 8px; background: #e94560; color: white; border: none; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; }
|
||||
.copy-btn:active { background: #c0392b; }
|
||||
.note { color: #aaa; font-size: 14px; margin-top: 8px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🦞 U-Claw Linux SSH</h1>
|
||||
<p style="text-align:center; color:#aaa;">在 Linux 上运行以下命令,让 Mac mini 远程控制</p>
|
||||
|
||||
<div class="step">
|
||||
<h2>第 1 步:安装并启动 SSH</h2>
|
||||
<div class="cmd" id="cmd1" onclick="copyCmd('cmd1')">
|
||||
sudo apt update && sudo apt install -y openssh-server && sudo systemctl start ssh
|
||||
<button class="copy-btn" onclick="copyCmd('cmd1')">复制</button>
|
||||
</div>
|
||||
<p class="note">粘贴后回车,输入密码确认安装</p>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<h2>第 2 步:设置密码</h2>
|
||||
<div class="cmd" id="cmd2" onclick="copyCmd('cmd2')">
|
||||
sudo passwd $USER
|
||||
<button class="copy-btn" onclick="copyCmd('cmd2')">复制</button>
|
||||
</div>
|
||||
<p class="note">输入两次新密码(用于 SSH 登录)</p>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<h2>第 3 步:查看 IP 地址</h2>
|
||||
<div class="cmd" id="cmd3" onclick="copyCmd('cmd3')">
|
||||
hostname -I
|
||||
<button class="copy-btn" onclick="copyCmd('cmd3')">复制</button>
|
||||
</div>
|
||||
<p class="note">会显示类似 192.168.18.xx 的地址</p>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<h2>第 4 步:回到 Mac mini</h2>
|
||||
<p>把 IP 和密码告诉 Claude Code:</p>
|
||||
<div class="cmd" style="color:#e94560; cursor:default;">
|
||||
ssh ubuntu@192.168.18.xx 密码是 xxx
|
||||
</div>
|
||||
<p class="note">Claude Code 就能通过 Bash 工具远程控制 Linux 了 🎉</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function copyCmd(id) {
|
||||
const el = document.getElementById(id);
|
||||
const text = el.childNodes[0].textContent.trim();
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
const btn = el.querySelector('.copy-btn');
|
||||
btn.textContent = '已复制 ✓';
|
||||
setTimeout(() => btn.textContent = '复制', 1500);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user