How to SSH into a local virtual box

Virtual Box... What's not to like? Now every OS, every weird combination is possible from the comfort of a single keyboard!

Case in point: I currently have a Netbsd virtual machine on my Mac Book Air. So nice to have a decent, stable, sane environement to change from the eye candy of Mac OS X... ;-)

This is just a simple visual "HOW TO", more of a reminder than anything else.

1. Check the vm network configuration:

This is more or less what you should be seeing:

The most important thing to remember is that your machine should be NAT-ted on your network.

Now, click on the Port Forwarding button and read on below...

2. Create a forwarding rule for SSH

Simple enough: create a forwarding rule from localhost, port 2244 to the SSH, port 22 of the Netbsd virtual machine.

And? That's it!!

3. SSH into your virtual machine

And it cannot be more simple:

The magic here, of course, is that port 2244 is going to redirect seamlessly to the local virtual machine.

SSH is now live, and you now have the best of both world... How easy is that? :-)

Hope this helps!