密码输入的也是对的,也能够双向ping通,但就是连接不上;
1. 首先确定主机和虚拟机能够双向ping通; 2. 确定在虚拟机上已经安装了ssh服务(sudo apt-get install ssh); 3. 修改配置文件/etc/ssh/sshd_config,打开后执行以下操作, 将其中的 PermitRootLogin prohibit-password 给注释; 然后新增PermitRootLogin yes; 见下图: 4. 最后重启ssh服务,执行命令:/etc/init.d/ssh restart; 5. 此时直接通点击xShell工具栏中的重新连接,发现已经连接上了!
PermitRootLogin prohibit-password
PermitRootLogin yes
/etc/init.d/ssh restart
重新连接