1. ssh登录到服务器后

sudo -i
vim /etc/ssh/sshd_config
修改 PermitRootLogin 后为 yes
修改 PasswordAuthentication 后为 yes
:wq 退出
sudo service ssh restart
sudo service sshd restart
下面设置密码 passwd {用户名}

2. 之后便可以通过用户名和密码的方式登录

 

posted on 2021-02-27 00:39  clayyjh  阅读(271)  评论(0)    收藏  举报