1.方法一
1、修改ROOT密码
sudo passwd root
2、sudo chmod 777 /etc/ssh/sshd_config
用完再把权限改回来
3、vi /etc/ssh/sshd_config
修改
PermitRootLogin yes
PasswordAuthentication no
————-centos修改—————
UsePAM yes
PermitRootLogin yes
PasswordAuthentication yes
—————————-
4重启ssh、
sudo systemctl restart sshd
2方法二
创建root 用户修改密码或者使用默认账户修改密码
sudo sed -i 's/^PasswordAuthentication no$/PasswordAuthentication yes/' /etc/ssh/sshd_config.d/60-cloudimg-settings.conf
然后重启sshd:sudo systemctl restart ssh
问题解决
© 版权声明
文章版权归作者所有,转载请预留文章地址。s.wbsun.net
THE END
暂无评论内容