Results 1 to 1 of 1
I'm new at this. I want to create a script to log me into a remote host with an ssh tunnel and port forwarding and then launch rdesktop. I can ...
- 04-25-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 3
Script for SSH and rdesktop
I'm new at this. I want to create a script to log me into a remote host with an ssh tunnel and port forwarding and then launch rdesktop. I can do it fine manually in two steps but I'd like to automate it.
First I log into a remote server and forward port 3389 to a Windows machine on that network.
$ssh -L 3389:[remote Windows XP IP address]:3389 myname@[remote linux server].com
This logs me into the remote machine and presents me with a remote shell
Once I'm logged in I open a new shell on my local computer and run ...
$rdesktop -g 1024x768 -T "Remote Computer" LOCALHOST
So, both commands need to be run from the LOCAL machine. Is there a way to do this in a script? If I simply create a script with both command lines in it, it doesn't work because the second line executes on the remote shell instead of the local.
Thanks.


Reply With Quote