ed25519 证书
生成密钥在: ~/.ssh/
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
将公钥内容复制进 ~/.ssh/authorized_keys
vi /etc/ssh/sshd_config
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes
PrintMotd no
UseDNS no
AddressFamily inet
SyslogFacility AUTHPRIV
PermitRootLogin yes
PasswordAuthentication no
重启ssh需要:
systemctl daemon-reload systemctl restart ssh.socket
发布:2026-06-15 21:09:33