360 Secure SkillHub
360 安全技能中心

RunPod pod management

提供 runpodctl 命令参考与挂载脚本,用于创建/启停 RunPod GPU Pod、获取 SSH 连接命令、通过 SSHFS 挂载 Pod 文件系统并查看代理端口;需预先安装 runpodctl 并配置 API Key 与 SSH 密钥。

分类:自动化
andrewharp
andrewharp
热度 50.78
最近更新 2026-05-17 11:36:05

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add andrewharp/runpod
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
runpod
description
Manage RunPod GPU cloud instances - create, start, stop, connect to pods via SSH and API. Use when working with RunPod infrastructure, GPU instances, or need SSH access to remote GPU machines. Handles pod lifecycle, SSH proxy connections, filesystem mounting, and API queries. Requires runpodctl (brew install runpod/runpodctl/runpodctl).

RunPod Skill

Manage RunPod GPU cloud instances, SSH connections, and filesystem access.

Prerequisites

brew install runpod/runpodctl/runpodctl
runpodctl config --apiKey "your-api-key"

SSH Key: runpodctl manages SSH keys in ~/.runpod/ssh/:

runpodctl ssh add-key

View and manage keys at: https://console.runpod.io/user/settings

Mount script configuration: The mount script checks ~/.ssh/runpod_key first, then falls back to runpodctl's default key. Override with:

export RUNPOD_SSH_KEY="$HOME/.runpod/ssh/RunPod-Key"

Host keys are stored separately in ~/.runpod/ssh/known_hosts (isolated from your main SSH config). Uses StrictHostKeyChecking=accept-new to verify hosts on reconnect while allowing new RunPod instances.

Quick Reference

runpodctl get pod                    # List pods
runpodctl get pod <id>               # Get pod details
runpodctl start pod <id>             # Start pod
runpodctl stop pod <id>              # Stop pod
runpodctl ssh connect <id>           # Get SSH command
runpodctl send <file>                # Send file to pod
runpodctl receive <code>             # Receive file from pod

Common Operations

Create Pod

# Without volume
runpodctl create pod --name "my-pod" --gpuType "NVIDIA GeForce RTX 4090" --imageName "runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404"

# With volume (100GB at /workspace)
runpodctl create pod --name "my-pod" --gpuType "NVIDIA GeForce RTX 4090" --imageName "runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404" --volumeSize 100 --volumePath "/workspace"

Important: When using a volume (--volumeSize), always specify --volumePath too. Without it:

error creating container: ... invalid mount config for type "volume": field Target must not be empty

SSH to Pod

# Get SSH command
runpodctl ssh connect <pod_id>

# Connect directly (copy command from above)
ssh -p <port> root@<ip> -i ~/.ssh/runpod_key

Mount Pod Filesystem (SSHFS)

./scripts/mount_pod.sh <pod_id> [base_dir]

Mounts pod to ~/pods/<pod_id> by default.

Access files:

ls ~/pods/<pod_id>/
cat ~/pods/<pod_id>/workspace/my-project/train.py

Unmount:

fusermount -u ~/pods/<pod_id>

Helper Script

Script Purpose
mount_pod.sh Mount pod filesystem via SSHFS (no runpodctl equivalent)

Web Service Access

Proxy URLs:

https://<pod_id>-<port>.proxy.runpod.net

Common ports:

  • 8188: ComfyUI
  • 7860: Gradio
  • 8888: Jupyter
  • 8080: Dev tools