@Theodore Omtzigt
Have you tried checking out the ports for ambari?
https://ambari.apache.org/1.2.5/installing-hadoop-using-ambari/content/reference_chap2_7.html
Those ports should only be for the web interfaces not the server if your trying to gain connectivity.
For the cli commands you can port forward with this command:
sudo iptables -A INPUT -i eth0 –proto tcp –dport 12345 -j ACCEPT
found here:
http://askubuntu.com/questions/311142/port-forward-in-terminal-only
or if you did install SSH then you can specify in this way:
https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding
I would have to tinker with you on this project because it dives past my understanding of the sandbox’s connection and the headless ubuntu server. I would have to double check ifconfig and port connections. best of luck, please let me know if I can try and help.