美文网首页
linux允许密码登陆

linux允许密码登陆

作者: jiaxiaolei | 来源:发表于2017-10-17 14:21 被阅读24次

基础信息:

$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)


修改/etc/ssh/sshd_config文件:

允许 root 登陆:

#PermitRootLogin yes
PermitRootLogin yes  #  改成yes

关闭密码鉴权登陆:

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes # 改成这个样子... 
#PermitEmptyPasswords no

重启 sshd:

$ service sshd restart

在服务器上修改密码:

$ passwd

从其他服务器就可以通过密码进行登录了。

$ ssh 172.28.26.211 -l root

相关文章

网友评论

      本文标题:linux允许密码登陆

      本文链接:https://www.haomeiwen.com/subject/kxgzsxtx.html