基础信息:
$ 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
网友评论