Rdesktop over ssh tunnel through a firewall

I wanted to be able to terminal service into my work PC from home. The only way to log into my office is over SSH to a linux box. Using putty and port forwarding I was able to connect to my windows PC from home.

How to connect to a windows PC that is natted behind a firewall from a linux PC at your home. You need:
1. putty installed on your windows pc at work
2. an ssh server that accepts ssh sessions from the outside world and is accessble form your home and work computers. TCPforwarding must be enabled on this ssh server.
3. ssh and rdesktop installed on your home linux computer

On the windows PC behind a firewall.

1. open putty
2. On left hand side, click on SSH
3. Check "enable compression"
4. On left hand side click on "Tunnels"
5. Check "Local ports accept connection from other hosts" and "remote ports do the same"
6. in "source port" put 3389
7. in destination put localhost:3389
8. check "remote"
9. on left side click on "session" and save your session
10. with putty then log into your SSH server.
11. You must have at least 2 accounts on your windows PC. With one account ssh into the ssh server. You will rdesktop into the other account. You cannot rdesktop into the same account you are running ssh from.
12. Make sure your terminal services is enabled. In control panel, click on: system >> Remote. Then give access to whatever users.
13. Windows XP Pro only allows one concurrent user. If you rdesktop into your windows PC, then it will kill your session that is running the tunnel. On your windows PC, click on log off, then switch users, but don't actually switch to another user. This will put your first session in the background and keep your ssh tunnel going, but no users will be on the system.

The above creates an ssh tunnel from the ssh server to your windows PC. Any requests on the ssh server to port localhost 3389 will go through the tunnel to your windows PC.

On linux PC outside of firewall at home.

1. connect to ssh server with:

ssh -L 3389:localhost:33XX ssh.server.com
2. in a new window on your linux pc start rdesktop with

rdesktop -a 24 -z -f localhost

The above creates a tunnel from your linux pc to your ssh server. All requests to localhost port 3389 on your local linux PC will be tunneled to the ssh server. Which will then be tunneled to your windows pc.

The rdestkop arguments: -a 24 sets it to 24 bit color, -z turns on compression, -f sets it to full screen.

My solution

I've used this two, to finally ssh over a tunnel without installing putty, but installing cygwin:
http://www.ucl.ac.uk/cert/openssh_rdp_vnc.pdf
http://pigtail.net/LRP/printsrv/cygwin-sshd.html
Your explanation make me realize wich port to use when ssh'ing for rdesktop to work properly.

Hacked

I'm being hacked (Gateway laptop with Vista) by bluetooth using "I guess you're right" wma.c:\Windows\winsxs\x86_microsoft-windows-musicsamples_31bf3856ad364e35_6.0.6000.16386_none_a81d9e66b53cd1c0

It won't let me delete - can't change owener or permissions...can anyone help me defeat and delete this? Other tips for purging bluetooth hacking??? HELP!

Remove the file in question

Remove the file in question while in Safe Mode.
Disable bluetooth when you're not using it.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.