SSH 密钥
生成 SSH 密钥对
# 生成 Ed25519 密钥对(更先进)
ssh-keygen -t ed25519 -C "your_email@example.com"
# 生成 RSA 密钥对(兼容性好)
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
公钥部署到远程服务器
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@remote_host
# 生成 Ed25519 密钥对(更先进)
ssh-keygen -t ed25519 -C "your_email@example.com"
# 生成 RSA 密钥对(兼容性好)
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@remote_host