C.W.K.
Stream
Lesson 02 of 06 · published

SSH Direct — 항상 작동하는 setup

~16 min · remote, ssh, ed25519, config

Level 0🌱 입문자
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

SSH stack 재사용, 독점 터널 X

SSH Direct 가 가장 흔한 Remote setup. 기존 SSH 인프라 — key, ~/.ssh/config, jump host — 사용, Anthropic-독점 agent / 커스텀 protocol X. SSH 가능한 머신이면 Claude 세션 hand off 가능.

Prereq: 양쪽에 Claude Code 설치 + 인증, key 기반 SSH (Remote 에 password X — payload 가 코드 포함), target 명명하는 ~/.ssh/config 항목. ed25519 key 가 추천 기본; RSA 도 됨.

Setup 흐름: 원격에 Claude Code 설치, SSH key 생성 또는 재사용, 원격에 public key 추가, ~/.ssh/config 항목 작성, Claude Code Desktop 에 destination 등록 (또는 claude remote add), claude remote ping + claude remote check dry-run, 그 다음 진짜 hand off.

Code

End-to-end SSH Direct setup·bash
# 1. Install Claude Code on the remote
ssh user@remote-host
npm install -g @anthropic-ai/claude-code
export ANTHROPIC_API_KEY=sk-ant-...
claude --login           # or set the env var permanently
exit

# 2. Generate / reuse an ed25519 key
ssh-keygen -t ed25519 -C "claude-remote" -f ~/.ssh/claude_remote
ssh-copy-id -i ~/.ssh/claude_remote.pub user@remote-host

# 3. ~/.ssh/config
cat >> ~/.ssh/config <<'EOF'
Host my-dev-server
    HostName 192.168.1.50
    User ubuntu
    IdentityFile ~/.ssh/claude_remote
    ServerAliveInterval 30
    ServerAliveCountMax 3
EOF

# 4. Register and verify
claude remote add my-dev-server
claude remote ping  my-dev-server
claude remote check my-dev-server     # version compatibility
Real handoff·bash
# Hand off the current session
claude remote handoff my-dev-server

# Hand off and immediately resume on the remote (new terminal)
claude remote handoff --resume my-dev-server

# Hand off targeting a specific project path
claude remote handoff --remote-path /home/ubuntu/myproject \
                      my-dev-server

# Hand back to local
claude remote handoff --back local

External links

Exercise

진짜 원격 머신 (homelab, 싼 cloud VM, LAN 의 다른 Mac) 에 SSH Direct end-to-end 설정. claude remote ping + claude remote check 실행. 세션 hand off, 원격에서 뭔가, hand back. 타이밍 캡처.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.