您的位置:首页 > 运维架构 > Linux

pem方式登录的CentOS系统修改为密码登录方式

2015-12-03 12:01 585 查看
1、需要用pem文件连接到centos系统中,
xshell 使用pem文件登录:http://blog.csdn.net/gsying1474/article/details/50158817

2、修改root密码
sudo passwd root
然后输入两次密码

3、修改centos登录方式为密码登录
打开配置文件 /etc/ssh/sshd_config (ubuntu 为/etc/ssh/sshd-config),设置如下几个参数:

PermitRootLogin yes

PubkeyAuthentication no (也可用#号注释)

PasswordAuthentication yes
4、重启sshd服务
/etc/init.d/sshd restart
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: