Hi,
I have quite strange problem with Ubuntu 20.4 on VirtualBox.
At first I had network issues, meaning my VM couldn't connect wirelessly with the internet. Even with Network Bridge, the right adapter chosen (en0: WLAN), "allow all VMs" and Cable Connection approved, no internet connection could be made.
After I edited the MAC-adress of my VM, so it resembled the MAC-adress of the host, I was able to get an internet connection on my VM.
Everything worked flawlessly until I tried to connect the host with the VM via ssh.
Now, I always get the error message: "ssh connect to host (IP-adress) port22: no route to host".
When I ping the host device I get the error message: "Destination host unreachable".
On the internet I found a comment which says that using the same MAC-adresses on different devices can lead up to such a "no route to host" error.
Is there any other solution to get an internet connection or a functioning connection via ssh while using the same MAC-adresses?
Thank you for your help.
ssh connection problem caused by MAC-adress
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: ssh connection problem caused by MAC-adress
Bridged does not always work with Wi-Fi, see Virtualbox Networks: In Pictures: Bridged Adapter for alternatives.shenrik wrote:my VM couldn't connect wirelessly with the internet. Even with Network Bridge, the right adapter chosen (en0: WLAN)
This breaks a fundamental in networking: no duplicated MAC addresses. It confuses the router, and may cause things likeshenrik wrote:I edited the MAC-adress of my VM, so it resembled the MAC-adress of the host
The solution is to get the VM to act as a separate device, not duplicate an existing device. It is possible to use Wi-Fi and get internet in the VM and access the VM with services like SSH using plain NAT, see Virtualbox Networks: In Pictures: NAT.shenrik wrote:"ssh connect to host (IP-adress) port22: no route to host".