200字
Linux 重装备忘录
2023-02-24
2025-12-02

设置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

Linux 重装备忘录
作者
Administrator
发表于
2023-02-24
License
CC BY-NC-SA 4.0

评论