Sunday, 5 January 2014

Connecting to a Jolla via SSH over USB from OSX

Out of the box it is not possible to connect to your new Jolla via SSH over USB from OSX.

This is inconvenient: for instance I do lots of development work on the train, where there is no WLAN (or rather it there is, but not free), or at work, where I can't connect the Jolla to the corporate network, and have not got it (yet) to connect to the Visitor WLAN.

But with a bit of tweaking it is possible to get an SSH over USB connection going.



I found the main idea here: https://plus.google.com/+MikkoAhlroth/posts/ZQFRBfCjRsy Thanks to Mikko for shown me how.

This uses the horndis driver available at  http://joshuawise.com/horndis It's tiny, so it will take only seconds to download.

Before you start, make sure you are not already connected to your Jolla via SSH over WLAN. if so disconnect.

Install the horndis driver to your OSX development host.

On your Jolla open System Settings / Developer Mode / Developer Tools. Select the USB Connection. If you have a Nokia N9, then you will need to change the Jolla's default IP number from 192.168.2.15 to something else. This is because this number is already used by the N9. I chose 192.168.2.17. Don't chose 19.168.2.16, as this IP number will be used by the development host.

Plugin your Jolla via USB. You should get get a blue popup allowing you to select Developer Mode. Select Developer Mode.

Next on your OSX development host open System Preferences / Network. You should have a new entry Sailfish.

Set:

Configure IPv4: Manually

IP Address 192.168.2.16 (this will be IP of your OSX developer host, as seen from your Jolla)

Subnet Mask 255.255.255.0

Router 192.168.2.17 (the IP number you set on your Jolla under Developer Tools)

DNS Server 192.168.2.17 (set this via Advanced)

Press Apply at the bottom of the Network Dialog.

NewImage

Now you should be able to connect via SSH over USB

ssh nemo@192.168.2.17

Or, if you read my last post, and have setup  a RSA file for connection to your Jolla:

ssh -i ~/.ssh/jolla_rsa nemo@192.168.2.17

If you get asked:

The authenticity of host '192.168.2.17 (192.168.2.17)' can't be established.
RSA key fingerprint is ca:c9:59:e8:dd:78:67:51:74:c4:d5:9b:6f:83:20:a9.
Are you sure you want to continue connecting (yes/no)?

Answer with yes

P.s. you may need to restart your OSX host during the process if this does not work first time.

Enjoy!

 

 

1 comment: