PC Connectivity

Maemo PC Connectivity provides tools to simplify setting up of communication between the Tablet and the PC at two parts:

- Connection setup: To configure a TCP/IP connection based on different mechanisms (USB, Bluetooth, WLAN) and different operating systems (Linux, Mac OS and Windows)

- Communication tools: remote shell (SSH, SBRSH), secure remote copy (SCP), mounting file systems (SSHFS, NFS, SMB)

Quisque eros erat, lobortis a, luctus et, euismod vitae, justo. Quisque velit orci, gravida in, commodo ac, cursus nec, magna.

documentation

Configure the SSH connection

SSH (secure shell) allows you to run programs on the Tablet from the comfort of your host PC. Also, SSH packages come with SCP (secure copy) to let you copy files from the host to the Tablet.

Verify connection

Verify the installation from the host:

  • ssh root@192.168.2.15

If this is your first connection attempt to the Tablet, you will be asked to verify the connection:

The authenticity of host 'host (192.168.2.15)' can't be established.
RSA key fingerprint is ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'host,192.168.2.15' (RSA) to the list of known hosts.

Then you will be asked the root password (changed during the maemo-pc-connectivity setup of openssh):

  • ssh root@192.168.2.15's password:

Then, assuming success, you should be presented with a shell (the exact text depends on the OS image):

BusyBox v1.6.1 (2007-09-27 18:08:59 EEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
Nokia-Nxxx:~#

Eliminate password prompt

To avoid entering the password every time, you need to authorize the target to accept your identity from the host.

This process works in either direction, so “host” and “target” will change meaning. Initially you want “host” to be your Linux machine (host PC) and “target” to be the Tablet. For SBRSH setup (below), you will swap these, since the Tablet needs to make an ssh connection to the host PC as well.

The general steps are:

  • Create a public/private keypair for a given user's identity on the host

  • Copy the public key to the target user's database of authorized keys

  • Ensure the database is readable only by the target user

Please, note:

  • You must apply the appropriate steps for every host and target user combination. (You will probably want to connect to the “root” and “user” accounts on the Tablet for a given Linux user.)

  • You will only need to generate a given user's public key once, but it must be copied into every target user's database.

We have provided two methods of eliminating password prompt. Automatic and Manually.

Automatic

To automatic exchange the SSH public keys we have provided an application called exchange-ssh-key provided by host-pc-connectivity package. If you don't install it yet, click here to install it first. After, execute the command as following:

  • Run the command in the terminal: exchange-ssh-key -l <local_ip_address> -r <device_ip_address> -s <device_username> .
    Where:
        local_ip_address is the ip address of the host pc (probably your desktop)
        device_ip_address is the ip address of the tablet (n800, n810 etc.)
        device_username is the tablet username you want to exchange ssh keys (normally root)

After exchanging keys by using exchange-ssh-key command, the next ssh connections will work without requiring password.

Manually

To create the host user's public key:

<host> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hostuser/.ssh/id_rsa):
Created directory '/home/hostuser/.ssh'.
Enter passphrase (empty for no passphrase): <hit Enter>
Enter same passphrase again: <hit Enter>
Your identification has been saved in /home/hostuser/.ssh/id_rsa.
Your public key has been saved in /home/hostuser/.ssh/id_rsa.pub.
The key fingerprint is: f:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff

To copy the public key to the target user's database:

<host> scp ~/.ssh/id_rsa.pub targetuser@TARGET-IP:/tmp #(e.g., root@192.168.2.15 )
targetuser@ TARGET-IP 's password:

<host> ssh targetuser@TARGET-IP
targetuser@ TARGET-IP 's password:

<target> mkdir -p ~/.ssh
<target> cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
<target> chmod 600 ~/.ssh/ authorized_keys

Exit the ssh session and test the connection. There should be no need for a password, For instance:

  • ssh root@192.168.2.15