1

I have a VirtualBox guest installed on my Windows 7 host, which is a hortonwork sandbox.

The sandbox is up and running as below:

enter image description here

From the output, it indicates using localhost:4200 to access it via SSH.

for localhost, in my hosts file it is defined as below:

192.168.2.29 localhost
127.0.0.1 localhost
192.168.2.29 sandbox.hortonworks.com sandbox

So I use 192.168.2.29:4200 to access the host via SSH (in browser), however, it connects but showing from 172.18.0.2, if I run ifconfig, it also shows 172.18.0.2 as the ip address. here is the screenshot:

enter image description here

here is the /tmp folder: enter image description here

BUT, if I ssh into the 192.168.2.29 (Putty), I see different content in the /tmp folder: enter image description here

NOTE: Browser SSH shows a completely different content than Putty SSH

If I attempt to Putty SSH to 172.18.0.2, it will fail as below:

enter image description here

What is the real ip address? How can I connect to the guest via WinScp to the guest showing in Browser SSH?

VirtualBox guest's networking is set as Bridged, see below: enter image description here

Windows host networking is below:

enter image description here

Thank you very much.

UPDATE 20190909: If I attempted to SSH into 192.168.2.29:2222 as per suggested in @Anaksunaman's answer, I got rejected as below:

enter image description here

1 Answer 1

1

A couple points:

  • It appears as if the 172.x.x.x address is possibly a private network created by the sandbox itself. So it would make sense you couldn't log in to it.

  • Regarding the difference in tmp folders, there are two different users (root@sandbox-host and root@sandbox-hdf), so that would likely explain the difference.

What is the real ip address?

Based on your post, 192.168.2.29 seems to be the "real" IP (for VirtualBox).

How can I connect to the guest via WinSCP to the guest showing in the browser SSH session?

Based on some Googling, you may want to try logging into the sandbox via SSH on port 2222 (so 192.168.2.29:2222 or localhost:2222).

2
  • Thank you very much for the explanation. I tried in putty the ip:2222, it leads me to root@sandbox-host, I also tried WinScp and browser on this port 2222, they don't even let me in. Maybe there should be another bridge for connecting 172.x.x.x with 192.x.x.x?
    – mdivk
    Commented Sep 9, 2019 at 23:32
  • I believe the port 2222 suggestion comes from an old sandbox. I am using the latest HDF 3.1.1 sandbox for VirtualBox. I've updated my OP with error screenshot. Thank you.
    – mdivk
    Commented Sep 10, 2019 at 1:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .