Link to home
Start Free TrialLog in
Avatar of m3m0
m3m0

asked on

ssh tunneling to a terminal services

Hello,

I've been trying to ssh tunnel to connect to a machine via terminal services without success.

This is my setup,

From home i'm able to ssh tunnel to a machine at my work network and forward port 80 to my machine at home with no problem.  But now i need to do this for terminal services.

I use cygwin to ssh to a linux server in my network then when i try to forward port 3389 to the terminal service machine and it fails.

on the Linux server i use the following command   ssh -L 3389:localhost:3389  user@linuxserver

Another thing is also that i would have to somehow use a gui so that i can launch the terminal services screen so i've compiled cygwin with xfree86.


Basically i just want to get some suggestions on what would be the correct path for me to do this.

thx
G.

Avatar of Fatal_Exception
Fatal_Exception
Flag of United States of America image

Whew!  You might want to put this into the Linux area if you don't get help here.  Certainly out of my boundary.  Just a thought in case you don't get help, but there are some real good experts here who might join in.

FE  
Avatar of m3m0
m3m0

ASKER

Great thank you.
Avatar of yuzh
"i would have to somehow use a gui so that i can launch the terminal services screen so i've compiled cygwin with xfree86."

All you need to do is to enable X forward at both client and server for your secure
shell:

have a look at the following pages about how:
https://www.experts-exchange.com/questions/20667995/Tunnelling-Xsession-through-ssh.html
https://www.experts-exchange.com/questions/20700965/Cascade-a-X11-connection-from-a-remote-computer-within-an-internal-network-to-a-SSH-Xforwarding-connection-to-an-outside-computer.html


That is what we needed, a Unix Master!  :)

FE
ASKER CERTIFIED SOLUTION
Avatar of marko020397
marko020397

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
X tunneling also works between *nix and secure shell client for Windows,
(please remember to enable X11 tunneling in your windows ssh client).

If you setup X tunneling properly, the ssh can automatically setup the DISPLAY
value for you. and you can run you GUI app (including your terminal services,
inside the ssh connetion).
Yes, I think Greg(yuzh) is on to an alternative to markos suggestion here. Instead of going through the hassle of setting up RDP forwarding via the linux box, be sure to install rdesktop on the linux machine, start XWin (at home), ssh -X (to work/linux), rdesktop terminal server....:-)

Slightly cumbersome any way you turn it:-).

-- Glenn
rdesktop homepage: http://www.rdesktop.org/

-- Glenn
Avatar of m3m0

ASKER

Damm all you guys Rock!  I wish i could you all points for just looking at my question :-)  

In any case I was more confortable with Markos suggestion which worked.  BUt i''ll try the rest as well.  So I'll be awarding points to Markos.

Again, I aprecieate all the help and comments.

thanks

-G
Speaking for everyone here, am glad we could be of service.  BTW:  your company hiring?  :)  Just kidding.

Have a Happy Holiday Season.

FE