Results 1 to 8 of 8

Thread: Cannot ssh Virtualbox from Ubuntu 20.04

  1. #1
    Join Date
    May 2020
    Beans
    4

    Cannot ssh Virtualbox from Ubuntu 20.04

    Hello, I have been trying to make this work, I have looked at recommendations online around ufw and iptables rules, but unfortunately none worked.

    I do not know a lot about network settings, but here is the issue:

    I have an Oracle Virtualbox 6.1 on my Ubuntu 20.04 pc and I cannot ssh to that Virtualbox from the pc. The distribution on the Virtualbox is Debian 9 (Stretch) and I have set-up 2 adaptors, one NAT and the second one as host-only. I can successfully ssh from the Virtualbox to the pc, but not from Ubuntu to the Virtualbox. When I try to ping the Virtualbox from the pc, I keep getting "icmp_seq=num Packet filtered" error.

    I have exactly the same set-up on a laptop, i.e. Ubuntu 20.04 and Debian 9 Virtualbox sitting on the laptop, NAT and host-only adaptors, same WiFi connection and everything works fine.

    Has anyone else come across something like this before and any suggestions please how to resolve it?

    Many thanks!

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Cannot ssh Virtualbox from Ubuntu 20.04

    Use a bridged VM network connection.

  3. #3
    Join Date
    May 2020
    Beans
    4

    Re: Cannot ssh Virtualbox from Ubuntu 20.04

    Hi, thanks, I tried this too (i.e. one NAT adaptor and one Bridged), but unfortunately it didn't work.

    This time it doesn't seem to ping at all and I know for sure ssh is up and running on both ends.

  4. #4
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Cannot ssh Virtualbox from Ubuntu 20.04

    Thread moved to Virtualisation.

  5. #5
    Join Date
    Jun 2016
    Beans
    2,831
    Distro
    Xubuntu

    Re: Cannot ssh Virtualbox from Ubuntu 20.04

    How do you have networking set up in the guest OS? Are you using NetworkManager in the guest?

    Is the VM on your laptop an actual copy of the VM you're having trouble with, or is it just (supposed to be) set up the same?
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    When your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Cannot ssh Virtualbox from Ubuntu 20.04

    Any chance you can prove what is being claimed?
    Seeing normal network troubleshooting commands and outputs would be helpful as well.
    It is very difficult to be helpful with interpreted information.
    ssh -vvvv would be very helpful too.

    And please only have 1 NIC enabled at a time during troubleshooting. Routing can get funky when multiple NICs are enabled.
    Last edited by TheFu; April 27th, 2021 at 04:06 PM.

  7. #7
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Cannot ssh Virtualbox from Ubuntu 20.04

    Just out of interest do you use the user@IP when using ssh to connect to another machine or do you use user@hostname or does it vary from machine to machine?

    Are the machines all on the same LAN, ie connected to the same router?

  8. #8
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Cannot ssh Virtualbox from Ubuntu 20.04

    First, I assume you're trying to ssh from the host's virtual IP to the VM's virtual IP, something like 10.8.x.y.

    Any chance the firewall is enabled on the VM?

    You don't need two network interfaces. As TheFu says, this can only lead to trouble. Create one adapter and set it to Bridged. Then the VM will receive an IP address in the same network as the host and should be visible to any machine on your network.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •