I installed centos 7 on virtualbox on my local pc. I configured in the vm 2 adapter cards one as a bridge Adapter and the other as host only adapter : enter image description here

enter image description here

Right now I have 2 network adapters that are configured with a valid ip address :

  • enp0s3 : (bridged)
  • enp0s8 : (host-only)

The configuration for enp0s8 :


When I ping google it works which means that the first network card is working fine. However, when I'm trying to connect via putty (ssh) to the vm It fails..

Any idea what else I can check ?

  • Which address are you using to connect to? Are you trying to connect from the host or some other needing on your Lan?
    – roaima
    Jan 13 '18 at 22:46
  • I tried to connect to both of them but it failed. I guess that I should be able to connect only to the second ip. I'm trying to connect from the host.
    – JeyJ
    Jan 14 '18 at 7:44
  • Why have you set your host-only interface to be your default route (DEFROUTE="yes")?
    – roaima
    Jan 14 '18 at 13:20
  • Please add the interface definition for enp0s3 to your question. (As text, not a screenshot.). And the result of either ip route or netstat -rn.
    – roaima
    Jan 14 '18 at 13:21

Have you created the host-side interface for the host-only network?

From the VirtualBox GUI: "File" → "Preferences" → "Network" → "Host-only network" → "(+)Add host-only network"


  • I dont have the option "Host only network" in the path you specified. Just nat framework. I'm working on version 5.2.4
    – JeyJ
    Jan 14 '18 at 0:12

the solution was disabling the firewalld service. Thanks !


You need to keep Adapter 1 Option to NAT and set Adapter 2's attached to: option to Bridged Adapter with name parameter set to WIFI adapter if your system is using WIFI connection. After that you can check for ifconfig and get inet of enp08 or something like that and try to create ssh using that. enter image description here

enter image description here

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.