This site is now 100% read-only, and retired.

Forwarding remote X via telnet?

Posted by ntropia on Wed 14 Dec 2005 at 17:59


I need to access from the X display of some remote machines (Irix & Linux) behind a firewall from my laptop running a simple Sarge installation. Normally this would be simple but I only have telnet access and not ssh.

The problem is that (simplifying) I can reach these remote servers via telnet only (it sound weird, but I'm not in the head of firewall admin), and then I make an ssh connection back to my box.

I think that a clue could be to use the remote tunneling option together with X forwarding, but I have no idea on how to set display accordingly on remote machine.

Maybe could be easier using VNC, but I prefer to not install it on servers.

Searching around the web I didn't found much more than basic port forwarding...




Re: Forwarding remote X via telnet?
Posted by rjc (87.74.xx.xx) on Wed 14 Dec 2005 at 18:38
As far as I understand you've got ssh on both machines, right?
You can ssh back, from behind the firewall but not to. It means that ssh port is blocked on the firewall and telnet port is available, right?
If both are right then get rid of telnet and set up ssh to use telnet port instead (if everything is by default just change port no. from 22 to 23)


[ Parent ]

Re: Forwarding remote X via telnet?
Posted by ineiti (81.221.xx.xx) on Wed 14 Dec 2005 at 22:57

I once had a similar problem: I wanted to connect to a computer behind a firewall that blocks everything... Here is what I did: SSH-relay

Now, if I understood you correctly, "remotehost" will be your own box, and "Dad's comp" is the computer behind the firewall. You need a sshd running on the computer behind the firewall! Then you:

sarge_1# telnet behind_firewall
behind_firewall# ssh -R 10020:localhost:22 user@sarge
In a new window on sarge, type:
sarge_2# ssh -X -p 10020 user@localhost
Now you can use this sarge_2 session for running everything that needs X!


[ Parent ]

Re: Forwarding remote X via telnet?
Posted by ntropia (82.51.xx.xx) on Thu 15 Dec 2005 at 09:43
Thanks for all replies!

To rjc: there are no forward rules on firewall that send ssh incoming connections to the machine I would to reach... The weird thing is that I need to telnet to the firewall and then from there to the machine I need, otherwise I can't see it from outside. Bad fw management at all.

To Ineiti: that's exactly what I would to obtain. It works perfectly! Just... thank you very much!

[ Parent ]

Re: Forwarding remote X via telnet?
Posted by Anonymous (65.218.xx.xx) on Wed 21 Dec 2005 at 18:19
Hello, everyone.

I need to have X session (server) to remote Unix (Solaris) , Linux (Debian, RHEL-based) servers from other Windows and Unix/Linux boxes.

How can I do that without using VNC or installing additional software on the hosts?

I just want to use native X server with secure sessions ( in conjunction with SSH ).

Which tools are proper for this job? Please recommend.


[ Parent ]