小编Ken*_*Ken的帖子

无法通过 SSH 连接到 VM

我有一个安装了一些自定义磁盘映像 (CentOS) 的 VM,我无法通过 SSH 连接到 VM。

以下是我尝试过的一些事情:

[VM]$ ssh root@localhost
Password:
Run Code Online (Sandbox Code Playgroud)

太好了,ssh 正在使用环回。

但是当我从主机尝试时:

~/VirtualBox VMs% ssh -v -v -v root@192.168.56.1
OpenSSH_5.9p1, OpenSSL 0.9.8y 5 Feb 2013
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.56.1 [192.168.56.1] port 22.
debug1: connect to address 192.168.56.1 port 22: Connection refused
ssh: connect to host 192.168.56.1 port 22: Connection refused
Run Code Online (Sandbox Code Playgroud)

纳达。虽然 Ping 有效。

在 VM 上,/etc/hosts.allow:

ssh:ALL:allow
sshd:ALL:allow
Run Code Online (Sandbox Code Playgroud)

hosts.deny 中没有任何内容 …

ssh

7
推荐指数
1
解决办法
4万
查看次数

标签 统计

ssh ×1