开启密码登录
- 编辑配置文件
vi /etc/ssh/sshd_config
PasswordAuthentication yes - 重启 SSH 服务
systemctl restart sshd
开启 root 用户远程登录
- 编辑配置文件
vi /etc/ssh/sshd_config
PermitRootLogin yes - 重启 SSH 服务
systemctl restart sshd
PasswordAuthentication yes
systemctl restart sshd
PermitRootLogin yes
systemctl restart sshd