Hi. Dhruva here. I got a new system and I was trying to set it up.I have set up ubuntu using virtual box in it and now I was trying to use putty. In my previous system, when I wrote thee command - ifconfig, I got an address which was something like 192.168.0.25 and i entered that in putty to use it over there via SSH connection. But in the new system, the same command gives me an address which is 10.2.something. In putty, the 192.something address works but not the 10.2 one.
. I remember in the previous system I faced this issue long back but setting up a bridge adapter in the setting solved it. i did the same here but it doesn’t work.
I followed the steps of the first answer. In his case, when he run the command on cmd, he got an IP address corresponding with the mac address seen on the virtual machine settings. In my case, I can’t find my mac address in the command prompt
In his case, there was a physical address in the cmd which was the same as his mac address but that is not the case for me. I hope you understand. Please help me.
One more update.
When my adapet is NAT then i get the above results. But when my adapter is a bridged adapter and i do ifconfig on my ubuntu, then i get an address 192.168.0.26 but it does not work with putty.
Or other best option is to use Vagrant instead of Virtualbox. Using vagrant, you not only can ssh into the guest machine but you can also add the synching folder between host and guest machine.
So you can write your code on windows and then you can run the same file inside the ubuntu OS.
@rahul.singh1, thanks for the vagrant solution. That works for me. I would request you to have a look at this other thread of mine as this is an issue I am facing when trying to run a code on the new VM.