1 打开MobaXterm 点击左上角session,弹框点击 ssh
2 Remote Host 输入虚拟机IP地址,勾选Specify username ,填入root,点击ok
3 输入密码
4 连接成功
5 禁用防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
查看防火墙状态
systemctl status firewalld.service
6 免密登录设置
# 生成密钥对
ssh-keygen -t rsa -P ''
# 将 id_rsa.pub 追加到授权的key中
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys