AWS中Centos创建后登录以及修改密码配置

1、需要用pem文件连接到centos系统中,

xshell 使用pem文件登录:[http://note.youdao.com/share/?id=7d0edf8e0946024dd4f52779708e68aa&type=note](http://note.youdao.com/share/?id=7d0edf8e0946024dd4f52779708e68aa&type=note)

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

</article>

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容