Thursday, April 19, 2012

Tunneling VNC over SSH to Mac OS X using bVNC

These instructions pertain to bVNC Secure and Free bVNC Secure, but they can be easily translated to instructions for ssvnc as well. bVNC is an Android and Blackberry 10/Playbook application, available on Google Play and App World respectively. Find it on your mobile device or here:

Google Play, for devices running Android 2.2 and up, or here:

App World for Blackberry Playbook and Blackberry 10 devices.

Ensure you have v3.5.0 of bVNC or newer for this method to work.

0) If the Mac OS X computer is not attached directly to the Internet, forward port 22 to it. Port forwarding instructions are different for every router out there, so look up how to do that for your make and model. Also, having a fixed IP address for the computer helps. Finally, DynamicDNS set up on your router would help you immensely to locate your router on the Internet.

0) Set up Remote Desktop on your Mac:
- Open System Preferences
- Under Internet & Wireless, click on ‘Sharing’

- (a) Enable SSH by selecting the ‘Remote Login’ option (put a check-mark)

- Make sure your 'Remote Login' settings look like the screen-shot above
- The same settings window shows where I've highlighted username (iordan in my case) and hostname or IP address to use (lebigmac.iiordanov.com in my case)

- (b) Enable VNC by selecting the 'Screen Sharing' option (put a check-mark)
- Click on "Computer Settings..."

- Make sure your 'Screen Sharing' settings look like the screen-shot above
- Click OK

1) Start bVNC and configure a VNC over SSH connection:
- Select "VNC over SSH" in Connection Type
- Optionally name the connection in Title.
- Type in your external (Internet) IP address or Dynamic DNS hostname in SSH Server.
- Leave port 22 for SSH port.
- Type in the User name and Password of the Mac user you'd like to connect with in the fields under SSH Tunnel Settings
- Leave localhost in for VNC Server, and port 5900 for VNC port.
- Type the same User name and Password of the Mac user you'd like to connect with in the fields under VNC Connection Settings
- You may need to check "Local mouse pointer" in Advanced Settings, to see where the mouse pointer is.
- Tap "Connect", and you should be in. Please note that not all routers are capable of doing loopback connections, so you may not be able to connect to your Internet IP address while you are BEHIND the router. I.e. unfortunately, due to router limitations, you may have to be elsewhere to test this in some cases.

8 comments:

  1. Sorry can you explain further how I can change on the Mac the ssh password authentication. Thnaks in advanced (marego@gmail.com)

    ReplyDelete
  2. Congrats! I’ve nominated you for the Very Inspiring Blogger Award:
    http://blazingbulgaria.wordpress.com/2012/07/26/blogger-award/

    The rules to follow are simple:
    - Display the award logo on your blog.
    - Link back to the person who nominated you.
    - State 7 things about yourself.
    - Nominate 15 other bloggers for this award and link to them.
    - Notify those bloggers of the nomination and the award’s requirements.

    ReplyDelete
  3. Hello.
    I try to follow all the steps but it fails to connect my android tablet to macbook. The reason of failure is "null". What can it be?

    ReplyDelete
    Replies
    1. Hey, I am not sure what's happening but it looks like a null pointer exception which was handled somewhere along the way. I would need some debug output in order to diagnose and fix this. IF you would like to help, please email me at iiordanov -a-t- gmail -d-o-t- com. Thanks!

      Delete
  4. Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.
    Malaysia Public Fixed IP

    ReplyDelete
  5. They can store the mail up to the space of 2GB. Using Gmail’s

    ReplyDelete