This article applies to the following:
- BlackBerry® Tablet OS
- BlackBerry® Native SDK
- BlackBerry® WebWorks™ SDK for Tablets
- BlackBerry® SDK for Android™ Apps
The BlackBerry Tablet OS allows for remote access using SSH for the purpose of testing and debugging applications. For security reasons, the SSH daemon does not run all the time. It must be enabled through the use of the blackberry-connect appliction, which is included in the BlackBerry® Native SDK, BlackBerry® WebWorks™ SDK for Tablets and BlackBerry® SDK for Android™ Apps.
Note: If you wish to access the private sandbox area of your application, ensure that you have installed a debug version of your application. You will not be able to access an application's directory on a release build of the application. The device will also need to be put into Developer Mode to access that location.
First you'll need to create a public and private RSA 4096 key. Follow the steps below that pertain to the OS you are using.
On Unix based machines you can create this using ssh-keygen using the following command:
ssh-keygen -b 4096 -t rsa
Windows based machines can create the key using PuTTYgen. To do so use the following steps.
You'll need a Debug Token installed on your BlackBerry PlayBook to continue. If you don't have one installed already, use your SDK of choice to create and deploy a Debug Token. If you are not sure how to do this use the Code Signing Self Help Form to locate the instructions for your SDK of choice.
Once you have your debug token install and public and private keys ready you can eanble the SSH daemon on the BlackBerry PlayBook by running blackberry-connect. Closing blackberry-connect will halt the SSH daemon, so leave it running for the duration of your testing.
blackberry-connect YOUR_DEVICEIP -password YOUR_DEVICE_PASSWD -sshPublicKey id_rsa.pub
If the connection was successful, you should see the following output:
Info: Connecting to target 169.254.0.1:4455 Info: Authenticating with target 169.254.0.1:4455 Info: Encryption parameters verified Info: Authenticating with target credentials. Info: Successfully authenticated with target credentials. Info: Sending ssh key to target 169.254.0.1:4455 Info: ssh key successfully transferred. Info: Successfully connected. This application must remain running in order to use debug tools. Exiting the application will terminate this connection.
You are now ready to connect using your SSH client of choice. Login using devuser when you connect. Unix based machines can use ssh application to do so.
ssh devuser@YOUR_DEVICE_IP_ADDRESS
Windows users can connect using putty. When configuring your SSH connection in putty, expand SSH on the left hand navigation tree, select Auth and then click on the Browse button and select the private key (id_rsa.ppk) you created earlier.
Once you are finished with your SSH session, just close blackberry-connect to disable the SSH Daemon, preventing any future SSH connections from being accepted.