#96 Allow RDP tunnelling through ssh more easily


I currently use scripts like this to use rdesktop from
home to my office:

ssh -C -L 3389:workbox:3389 work sleep 5 &
sleep 4
rdesktop -g 1280x1024 -a 16 localhost

This works, but is a PITA because I need to essentially
create one of these scripts per host I want to connect to.
It would be nice if rdesktop had a "--via" switch which
automates the ssh tunnel setup.
A similar option is supported by xtightvncviewer. Very


  • Chris Rodgers

    Chris Rodgers - 2006-04-14

    Logged In: YES

    Why not just extend your shell script a little to do this?


    ssh -C -L 3389:$2:3389 $1 sleep 5 &
    sleep 4
    shift 2
    rdesktop -g 1280x1024 -a 16 "$@" localhost

    Save this as "rdesktopvia" and call it as "rdesktopvia
    <gateway_host> <RDP server> <any other rdesktop parameters>".


  • Andrew Scherpbier

    Logged In: YES

    I guess in my original feature request I forgot to mention
    the the real problem is the inability to start multiple
    concurrent sessions to different machines without changing
    port numbers.

    Also the sleeps are pretty hoaky. Sometimes the script
    fails because of timing issues with those.

  • Ilya Konstantinov

    Logged In: YES

    Get rid of the sleeps and simply use 'ssh -f' to put it in
    the background as soon as it connects.

    I must note that built-in SSH support looks pretty alien to
    rdesktop, since unlike vnc (and rsync etc.), RDP is already
    encrypted. Also, typically xtightvnc SSHs to the same
    machine it's going to connect to, whereas you're doing a
    VPN-to-network setup, going through your firewall machine to
    a different machine. That's a tricky network setup, not
    something natural to rdesktop, and if we'll add that, we
    could as well add support for every other VPN software in town.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks