1.方法一
亚马逊云默认用户名ec2-user|root|centos
1、修改ROOT密码
sudo passwd root
用完再把权限改回来
----------------ubuntu 修改-----------------------
3、vi /etc/ssh/sshd_config
修改
PermitRootLogin yes
PasswordAuthentication no
————-centos修改—————
PermitRootLogin yes
PasswordAuthentication yes
UsePAM no
—————————-
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

暂无评论内容