Monday, June 6, 2011

sshd guide for N900 by droll

This is a guide on how you can maximize the utility of the N900 by boosting its performance with a full blown PC :) The general idea is simple - use the N900 to remotely connect to a PC to do work. There are a few problems:

  1. Doing serious work on the N900 over long periods of time is tiring - especially entering text.
  2. Remotely connecting to a PC must meet a few objectives - fast screen refresh, and secure communications.

In this guide, I will show you how to achieve the above.

  1. Install the SSH Client package from the repositories. You can also install the SSH Server + Client package if you want but the server will not be used. We will use the ssh protocol to achieve secure communications.
  2. Install the extmou and extkbd packages as well. These will allow you to use the N900 with a bluetooth keyboard and bluetooth mouse - greatly enhancing the experience of working on the N900 for long periods of time.
  3. In my case, I use the N900 remotely, and I have an unlimited 3G data plan. So I leave the laptop at home connected to broadband while I remotely connect using my N900. My laptop is thus behind a wireless router and broadband modem - meaning it's IP is NAT-ed. To expose the laptop to the internet, a few things are required. First, you need to configure your internet facing router to perform port forwarding.
  4. The standard port for ssh is TCP, 22. You need to forward port 22 from the external interface to your laptop's IP. The instructions will vary depending on your router. You can probably google it to find instructions.
  5. Next, discover your external (internet-facing) IP address. You can Google for sites that will help you discover this with "what's my IP address" keywords.
  6. If you want, you can register this IP with a dynamic dns service. There are a few free ones on the internet. I use since my router is a Dlink model and it has built-in support for service.
  7. Find and install a ssh server package for your laptop. Since I run windows, I use freesshd. There are instructions on the freesshd website on how to set this up.
  8. Once that's done, you are ready to test your first connection. On your N900, open x-term and type in "ssh -L 3389:localhost:3389". You should replace "abc" with the user name configured in freesshd. You should also replace "" with the domain name you registered on dlinkddns. If you are not using a dynamic dns service, you can replace it with your external (internet-facing) IP dadress which you discovered in step #5.
  9. If all goes well, you should be prompted to add the RSA key of the server to your N900's ssh repository. Go ahead and confirm it. Then you will be prompted for a password. Enter the password. This is the password for "abc" user that you configured in freesshd.
  10. By default, freesshd configures cmd.exe as the default interface after you negotiate a ssh connection. Therefore, you should see the Windows command prompt in your x-term. You can type commands like you were seated in front of your laptop.
  11. Once this works, you can disconnect by typing "exit" and ENTER. You should then install the rdesktop package from the repositories. This will allow you to use the RDP protocol to connect to your desktop. This is WAY FASTER than using VNC (and more compatible than X11 on Windows anyway). So we will use it.
  12. Re-establish your ssh connection (see step #8). This time around, you won't be prompted to add the keys, but you will get the password prompt.
  13. Once you are connected, launch rdesktop on your N900. Where you key in the host for connecting to, enter "localhost". Enter a user name and password for connecting via RDP. This will be an account that exists under Windows (different from your freesshd account).
  14. And voila! You should see your desktop!
  15. The next step is to configure your bluetooth keyboard and bluetooth mouse. This is relatively reasy.
  16. Pair your bluetooth keyboard like you would pair any normal bluetooth device. Do the same with the mouse.
  17. That's it. You shouldn't need to do any additional configuration. The keyboard should work with the extkbd package and the mouse with the extmou package. The only catch with the keyboard is that the key mappings might not be right. In this case, go to your Settings app (on the N900) and you should see a new entry in there for external keyboard support. Launch it and pick the appropriate keyboard layout. The Generic xxxx layouts are the ones I find that work best.

Happy computing!

Been busy...

I know that people are wondering if this blog is dead, it isn't... I just don't have time to publish stuff. I promise to do so in the next few minutes a tutorial by droll on how to get a full Windows access on your N900 while on the move. Just needed to get this out of the way before I published his tutorial.