生成 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

标签: none

添加新评论