1.编辑 /etc/ssh/sshd_config文件:  sudo vi /etc/ssh/sshd_config

将PermitRootLogin 的值改成 yes

将PermitEmptyPassword 的值改成 no

保存退出   

 

2.重启ssh:

查看状态:

systemctl status sshd.service

启动服务:

systemctl start sshd.service

重启服务:

systemctl restart sshd.service

开机自启:

systemctl enable sshd.service
Logo

欢迎加入 MCP 技术社区!与志同道合者携手前行,一同解锁 MCP 技术的无限可能!

更多推荐