Ed25519算法
ssh-keygen -t ed25519 -C "your_email@example.com"
旧算法
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
设置文件权限
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
ssh-keygen -t ed25519 -C "your_email@example.com"
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys