Linux 重装备忘录
设置root密码
sudo passwd root
su root
修改sshd_config
vim /etc/ssh/sshd_config
#Port 22 开启22端口或修改为其他端口
#PermitRootLogin yes 允许root用户登录
#PasswordAuthentication yes 允许密码登录
#PubkeyAuthentication yes 允许公钥登录
修改authorized_keys
vim /root/.ssh/authorized_keys
#添加公钥内容
重启sshd服务
service sshd restart