centos7 启用密码访问

163 阅读1分钟
  1. 编辑配置文件
vi /etc/ssh/sshd_config
  1. 设置为密码登陆方式
查找

PermitRootLogin yes

删除前面的#注释

查找

PasswordAuthentication no

改为

PasswordAuthentication yes
如果是注释状态,解注
  1. 重启ssh服务或重启服务器
service sshd restart