There are at least two ways for getting shell access to the BB10’s QNX layer. For both we rely on the Blackberry Native SDK set of tools, available as a free download on RIM’s website. One takes advantage of the QNX Momentics IDE and is easy as click and go, the other is more old school, involving command line , but also gives a better insight and control.
1. Using QNX Momentics IDE
Having the IDE installed and the BB10 connected to the computer, go to Window->Open perspective->QNX System Information:
If “Target Navigator” is not visible, toggle it from Window->Show View->Target Navigator.
Right click the device listed there, and select Launch SSH Session.
A SSH connection is now open, as devuser , a non privileged user account, and you can start using the shell.
Alternatively you can open the terminal in the Standard C/C++ Perspective View,
by going to Window->Show View->Other, and select Terminal, that will show up tabbed in the bottom menu
2. Using Command line, blackberry-connect, own SSH2-RSA keys and a SSH client (putty)
Step 1: Download PUTTY if you don’t already have it.
Step 2: Open PUTTYGEN, select type of key SSH-2 RSA, and number of bits in a generated key 4096. Press Generate and move the mouse to create random events.
Select the text under “Public key for pasting into OpenSSH authorized_keys file:”, from the start to the last equal (=) sign, and save it to a file, let’s name it pubkeyfile.
Save public key and private key, without entering any key passphrase, let’s name them key.pub and key.ppk
So now you have three files, key.pub, key.ppk and pubkeyfile.
Step 3: Having the Blackberry Native SDK tools installed, go to the location, start a command prompt / shell where you must run bbndk-env.bat / bbndk-env.sh . Make sure the three files generated at step 2 are in the same location, for convenience. Type:
blackberry-connect 169.254.0.1 -password 1234 -sshPublicKey pubkeyfile
Where 1234 is the BB10 password set when you enabled development mode.
If you are getting “Error: A network error occurred while communicating with the target.” you need to disconnect the device in QNX IDE first, by right clicking the USB target ->Blackberry tools->Disconnect
With blackberry-connect successful you’ll get something similar to:
Leave the window opened as instructed.
Step 4: In a new command prompt/ shell, type
putty.exe -i key.ppk -ssh email@example.com