【备忘录】配置ssh公钥登录

Oblivion's blog / 2024-10-29 / 原文

cat idrsa.pub >> ~/.ssh/authorized_keys
vim /etc/ssh/sshd_config
service sshd restart

config:

RSAAuthentication yes
PubkeyAuthentication yes

PermitRootLogin yes  #root 用户能否通过 SSH 登录
PasswordAuthentication no  #禁用密码登录