how to get the ipaddress of a virtual box running on local machine

user1015388 picture user1015388 · Mar 22, 2017 · Viewed 111.6k times · Source

I need to connect to my virtual box running on my local machine to transfer files from my local system to VM by using WinSCP.

How do I find the IP address? When I go to the settings and network tab, there I find something related to IP, but when I use that, it says cannot find or invalid.

Answer

Naveen kumar picture Naveen kumar · Mar 26, 2017

Login to virtual machine use below command to check ip address. (anyone will work)

  1. ifconfig
  2. ip addr show

If you used NAT for your virtual machine settings(your machine ip will be 10.0.2.15), then you have to use port forwarding to connect to machine. IP address will be 127.0.0.1

If you used bridged networking/Host only networking, then you will have separate Ip address. Use that IP address to connect virtual machine