参考地址:https://blog.51cto.com/u_15275035/2925832
第一步:输入 vi /etc/ssh/sshd_config
vi /etc/ssh/sshd_config
1.
将下面两行前面的 注释# 去掉
#PasswordAuthentication yes
#PermitEmptyPasswords yes
第二步:保存后退出编辑,输入 sudo service ssh restart 重启ssh服务
sudo service ssh restart
1.
第三步:输入ssh localhost 在kail上连接自己
ssh localhost
1.
输入密码,成功连接!