1. ssh登录到服务器后
sudo -i vim /etc/ssh/sshd_config 修改 PermitRootLogin 后为 yes 修改 PasswordAuthentication 后为 yes :wq 退出 下面设置密码 passwd {用户名}
2. 之后便可以通过用户名和密码的方式登录
ssh只能密钥链接更改成密码也能连接
原文:https://www.cnblogs.com/clayyjh/p/14454579.html