CentOS SSH密钥登陆改为密码登陆

先使用vnc或者putty用密钥连接上服务器,修改root密码

sudo passwd root

然后输入两次密码

修改centos登录方式为密码登录

打开配置文件 /etc/ssh/sshd_config (ubuntu 也为/etc/ssh/sshd_config),设置如下几个参数:

PermitRootLogin yes
PubkeyAuthentication no (也可用#号注释)
PasswordAuthentication yes

重启sshd服务

systemctl restart sshd   OR   service sshd restart
sanradar
sanradar
文章: 97

3 评论

  1. Insightful read! Your analysis is spot-on. For more detailed information, visit: READ MORE. Eager to see what others have to say!

  2. hey there and thank you for your info – I’ve certainly
    picked up anything new from right here. I did however expertise several technical issues using this site, as I experienced to reload
    the web site a lot of times previous to I could get it to load properly.
    I had been wondering if your hosting is OK? Not that I’m complaining, but slow loading
    instances times will sometimes affect your
    placement in google and can damage your high-quality score if ads and marketing with Adwords.
    Well I am adding this RSS to my e-mail and could
    look out for a lot more of your respective intriguing content.
    Ensure that you update this again soon.. Lista escape room

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注