ssh-keygen -t ed25519

cd ~/.ssh
cp id_ed25519.pub authorized_keys
chmod 700 authorized_keys

nano /etc/ssh/sshd_config

PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no

最后修改:2026 年 03 月 26 日
如果觉得我的文章对你有用,请随意赞赏