Menu

#96 Allow RDP tunnelling through ssh more easily

open
nobody
None
5
2012-11-29
2006-04-14
No

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

#!/bin/sh
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
handy.

Discussion

  • Chris Rodgers

    Chris Rodgers - 2006-04-14

    Logged In: YES
    user_id=661213

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

    e.g.

    #!/bin/sh
    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>".

    Chris.

     
  • Andrew Scherpbier

    Logged In: YES
    user_id=32816

    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
    user_id=335423

    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.