ssh-config
SSHキーの管理、設定ファイルの作成、トンネルやジャンプホストの設定など、SSH接続全般を効率的に行うSkill。
📜 元の英語説明(参考)
SSH key management, config file setup, tunnels, and jump hosts. Use when user asks to "setup SSH keys", "configure SSH", "create SSH tunnel", "add SSH host", "jump host", "port forwarding", or manage SSH connections.
🇯🇵 日本人クリエイター向け解説
SSHキーの管理、設定ファイルの作成、トンネルやジャンプホストの設定など、SSH接続全般を効率的に行うSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ssh-config.zip https://jpskill.com/download/6129.zip && unzip -o ssh-config.zip && rm ssh-config.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6129.zip -OutFile "$d\ssh-config.zip"; Expand-Archive "$d\ssh-config.zip" -DestinationPath $d -Force; ri "$d\ssh-config.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
ssh-config.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
ssh-configフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
SSH Config
SSH キー管理、設定、およびトンネリング。
キー管理
キーの生成
# Ed25519 (推奨)
ssh-keygen -t ed25519 -C "your@email.com"
# RSA (互換性)
ssh-keygen -t rsa -b 4096 -C "your@email.com"
# カスタムファイル名
ssh-keygen -t ed25519 -f ~/.ssh/github_key -C "github"
エージェントへの追加
# エージェントの起動
eval "$(ssh-agent -s)"
# キーの追加
ssh-add ~/.ssh/id_ed25519
# タイムアウト付きで追加 (12時間)
ssh-add -t 43200 ~/.ssh/id_ed25519
# キーのリスト表示
ssh-add -l
サーバーへのコピー
ssh-copy-id user@host
ssh-copy-id -i ~/.ssh/mykey.pub user@host
SSH 設定ファイル
場所
~/.ssh/config
基本的なホスト設定
Host myserver
HostName 192.168.1.100
User admin
Port 22
IdentityFile ~/.ssh/id_ed25519
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_key
ワイルドカード
Host *.example.com
User deploy
IdentityFile ~/.ssh/deploy_key
Host 192.168.1.*
User admin
StrictHostKeyChecking no
ジャンプホスト (ProxyJump)
Host bastion
HostName bastion.example.com
User jump
Host internal
HostName 10.0.0.5
User admin
ProxyJump bastion
その後: ssh internal
キープアライブ
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
ポートフォワーディング
ローカルフォワード
# ローカル:8080 をリモート:80 にフォワード
ssh -L 8080:localhost:80 user@server
# リモートデータベースにアクセス
ssh -L 5432:localhost:5432 user@server
# その後: psql -h localhost -p 5432
リモートフォワード
# ローカル:3000 をリモート:8080 で公開
ssh -R 8080:localhost:3000 user@server
ダイナミック (SOCKS プロキシ)
ssh -D 1080 user@server
# ブラウザを SOCKS5 localhost:1080 を使用するように設定
設定ファイル内
Host tunnel-db
HostName server.example.com
User admin
LocalForward 5432 localhost:5432
トンネル
永続的なトンネル (autossh)
# autossh のインストール
brew install autossh # または apt install autossh
# 永続的なトンネルの実行
autossh -M 0 -f -N -L 8080:localhost:80 user@server
バックグラウンドトンネル
ssh -f -N -L 8080:localhost:80 user@server
セキュリティ
パーミッション
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/config
chmod 600 ~/.ssh/authorized_keys
パスワード認証の無効化 (サーバー)
# /etc/ssh/sshd_config
PasswordAuthentication no
PubkeyAuthentication yes
クイックコマンド
# 接続テスト
ssh -T git@github.com
# 詳細デバッグ
ssh -vvv user@host
# リモートコマンドの実行
ssh user@host 'ls -la'
# ファイルのコピー
scp file.txt user@host:/path/
scp -r folder/ user@host:/path/
# SSH 経由の rsync
rsync -avz -e ssh folder/ user@host:/path/ 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
SSH Config
SSH key management, configuration, and tunneling.
Key Management
Generate Keys
# Ed25519 (recommended)
ssh-keygen -t ed25519 -C "your@email.com"
# RSA (compatibility)
ssh-keygen -t rsa -b 4096 -C "your@email.com"
# Custom filename
ssh-keygen -t ed25519 -f ~/.ssh/github_key -C "github"
Add to Agent
# Start agent
eval "$(ssh-agent -s)"
# Add key
ssh-add ~/.ssh/id_ed25519
# Add with timeout (12 hours)
ssh-add -t 43200 ~/.ssh/id_ed25519
# List keys
ssh-add -l
Copy to Server
ssh-copy-id user@host
ssh-copy-id -i ~/.ssh/mykey.pub user@host
SSH Config File
Location
~/.ssh/config
Basic Host Config
Host myserver
HostName 192.168.1.100
User admin
Port 22
IdentityFile ~/.ssh/id_ed25519
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_key
Wildcards
Host *.example.com
User deploy
IdentityFile ~/.ssh/deploy_key
Host 192.168.1.*
User admin
StrictHostKeyChecking no
Jump Host (ProxyJump)
Host bastion
HostName bastion.example.com
User jump
Host internal
HostName 10.0.0.5
User admin
ProxyJump bastion
Then: ssh internal
Keep Alive
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
Port Forwarding
Local Forward
# Forward local:8080 to remote:80
ssh -L 8080:localhost:80 user@server
# Access remote database
ssh -L 5432:localhost:5432 user@server
# Then: psql -h localhost -p 5432
Remote Forward
# Expose local:3000 on remote:8080
ssh -R 8080:localhost:3000 user@server
Dynamic (SOCKS Proxy)
ssh -D 1080 user@server
# Configure browser to use SOCKS5 localhost:1080
In Config
Host tunnel-db
HostName server.example.com
User admin
LocalForward 5432 localhost:5432
Tunnels
Persistent Tunnel (autossh)
# Install autossh
brew install autossh # or apt install autossh
# Run persistent tunnel
autossh -M 0 -f -N -L 8080:localhost:80 user@server
Background Tunnel
ssh -f -N -L 8080:localhost:80 user@server
Security
Permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/config
chmod 600 ~/.ssh/authorized_keys
Disable Password Auth (Server)
# /etc/ssh/sshd_config
PasswordAuthentication no
PubkeyAuthentication yes
Quick Commands
# Test connection
ssh -T git@github.com
# Verbose debug
ssh -vvv user@host
# Run remote command
ssh user@host 'ls -la'
# Copy files
scp file.txt user@host:/path/
scp -r folder/ user@host:/path/
# rsync over SSH
rsync -avz -e ssh folder/ user@host:/path/