Thursday, March 30, 2006

Followup to the Tuttle, OK guy

Here's a link to a followup story at The Register about the clueless Tuttle, OK city manager.

http://www.theregister.co.uk/2006/03/27/tuttle_email/

Tuesday, March 28, 2006

Linux to WinXP Remote Desktop over the internet

Here's how to connect to your Windows XP Professional desktop over the internet from a Linux box through SSH tunneling and a cool little program called rdesktop.

Requirements:
1. Windows XP Professional running an SSH server. (I use Cygwin with OpenSSH)
2. Linux running a desktop manager. (KDE or GNOME work fine)
3. rdesktop

Steps:
1. Setup the Windows box as an SSH server
2. Compile rdesktop on the Linux box
3. Create an SSH tunnel from the Linux box to the Windows box
4. Run rdesktop

Procedure:
1. Setup the Windows box as an SSH server

For instructions on how to install an SSH server on your Windows box using Cygwin, refer to the first four steps on my previous post here.

2. Compile rdesktop on the Linux box

Download rdesktop here and compile the source on your Linux box. The process is the same as any other program. If you don't know how to compile a binary from source, read the included README and/or Google it. It's not that hard.

3. Create an SSH tunnel from the Linux box to the Windows box

Open up a terminal in Linux and type in "ssh -L 3390:localhost:3389 username@servername" replacing username with your own username and servername with the name of your server. Once connected, leave the window open. Closing it will collapse the tunnel.

4. Run rdesktop

Open another terminal and launch rdesktop by typing "rdesktop localhost:3390". If everything is setup correctly, you should now be looking at your Windows XP desktop login screen in 8-bit color and VGA resolution. Of course now you can read the documentation included with rdesktop to tweak the various settings.

WinXP to WinXP Remote Desktop over the internet via SSH tunnels

I decided I should type out some how-to's on some cool things before I forget how I did it. Maybe someone else might find these useful too.

How to use Remote Desktop over the internet through SSH tunneling.

Requirements:

1. Windows XP Professional
2. SSH server and client (I use Cygwin with OpenSSH)

3. Broadband internet connection (we're displaying an entire desktop over the internet, not just text!)


Steps:
1. Setup a dynamic DNS forwarding address
2. Download and install Cygwin with the OpenSSH packages
3. Setup SSH server and open port 22 on firewall.
4. Make sure Remote Desktop is turned on and you can use it
5. Create a reverse SSH tunnel
6. Connect with remote desktop

Procedure:
1. Setup a dynamic DNS forwarding address
If you want to remember your IP address in order to connect to your computer you can skip this step but as for me, I wanted a simple web-style address that I could remember that would update if my IP changed. I used dyndns.com to create a name that would be easy to remember in order to login to my SSH server. You can setup an account with them for free and it allows you to alias a dynamic IP address to a static hostname.

2. Download and install Cygwin with the OpenSSH packages
Download and install Cygwin on both computers (the computer you want to connect to and the one you want to connect from.) When installing Cygwin, the default only installs minimum packages. I like to install all packages so click where it says "Default" and it will say "Install". This way it will install ALL packages. Installing Cygwin with all packages will take a while (even WITH the broadband connection) so go find something to do for a while.

3. Setup SSH server and open port 22 on firewall.
After installing Cygwin, set it up with the mkpasswd and mkgrp commands. Run ssh-host-config to setup the SSH server on the computer you want to connect to. I usually just go with the default responses. Answer yes to the key generation question and yes to install it as a service. After the ssh-host-config program finishes running, type "cygrunsrv -S sshd" to start the service. Open port 22 on your firewall and/or router.

4. Make sure Remote Desktop is turned on and you can use it
Make sure you have enabled Remote Desktop by right clicking on the "My Computer" icon and enabling Remote Desktop in the "Remote" tab. Click on "Select Remote Users" and make sure you have an account that is allowed to remotely connect.

5. Create a reverse SSH tunnel
Assuming you've successfully setup the SSH server you're now ready to connect! On your remote computer, (this could be at work, school, etc.; basically, anywhere with a high speed internet connection where you want to Remote Desktop to your home computer), open up a Cygwin prompt and connect to your SSH server like this:
"ssh -L 3390:localhost:3389 username@servername"
Accept the key and enter your password to connect.

6. Connect with remote desktop
Don't close the Cygwin window or else the tunnel will collapse. Open Remote Desktop (Programs->Accessories->Communications->Remote Desktop Connection) and connect to 127.0.0.1:3390
Login to your computer!