1

I created a Fedora 20 virtual machine with VirtualBox 3.18.

I created a host-only network adapter for it, it has the ip address 192.168.56.1 .

I ping that address from the host, it works.

I try to ssh into it, it does not work.

I get the following output from sudo firewall-cmd --list-all:

public (default, active)
  interfaces: p2p1, p7p1
  sources:
  services: dhcpv6-client mdns ssh
  ports: 22/tcp
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules

and ip addr shows that p7p1, which is the network adapter that has the MAC address of the VirtualBox host-only adapter, has only an ipv6 address.

When I ssh user@192.168.56.1, my connection is refused. Might that p7p1 network interface not having an IPv4 address cause this problem? From the above firewalld output it seems that the port is open.

sshd is running.

  • What is your host range of IP Addresses? What does the ifconfig command return from inside the VM. Please update your question with that information. – eyoung100 Oct 30 '14 at 15:14
1

In a Host-Only environment, usually your host computer gets the address 192.168.56.1 and all guests get addresses starting at 192.168.56.101. This can be configured in the VirtualBox settings window. If you are trying to access the Fedora guest system, you probably want this:

ssh user@192.168.56.101

replace user with your username on the guest system (e.g. fedora). You should also make sure that the ssh daemon is running and your firewall is not blocking your port. You can test this from your host machine:

nmap 192.168.56.101 -p 22

Assuming the guest is running an ssh server on port 22, this should tell you whether or not the port is open and whether or not it is being blocked by your firewall.


Also, VirtualBox can be kind of finicky about network interfaces attached to guest systems. If you are still having problems, try disconnecting all network interfaces except the host only network interface. Usually the guest system will ignore the host only network if you have nat configured.

  • Where can I find the address for the guest machine? 192.168.56.101 does not work. – Gergely Oct 31 '14 at 6:28
  • Never mind, the IPv6 address did work what ip addr did show. This was my first IPv6 address I ever used. Thanks for the above it did help. – Gergely Oct 31 '14 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.