linux 密钥登录如何设置密码登录

作者:青山常在人不老   阅读 (2277)  |  收藏 (0)  |  点赞 (0)

摘要

本文讲解在使用密钥登录的linux系统中,如何改成使用密码登录的方式。


原文链接:linux 密钥登录如何设置密码登录

1.首先 用密钥登陆 

moxterm密钥登录方式如下:

linux  系统设置密码登录教程

2.给 root 设置密码

sudo passwd root

注意,需要连续两次输入同一密码

3.密码设置好后 切换到root用户

 su root

注意:输入您刚刚设置的密码

4.修改ssh配置文件,允许密码登录

vim /etc/ssh/sshd_config

(1)将 passwordAuthentication no 改为  passwordAuthentication yes

(2)将 PermitRootLogin 改为yes

5 重启

 /etc/init.d/ssh restart

6使用密码登录

一定要在密码登陆成功的情况下,再禁用秘钥登陆,否则你就再也进不去系统了,一定!!!!!!!


分类   应用工具
字数   319

博客标签    linux 设置密码登录  

评论