LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-24-2012, 07:37 AM   #1
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
ssh with port mapping for X11 forwarding to bypass router


was reading an article the other day about some of the powerful tools of SSH, thus my other thread about sshfs. while reading i was reminded that you can bind a port and use that port for X11 forwarding even if the router is not configured for it.

I have completely forgotten how this works and when I tried I failed to get X11 to forward even when configured properly.

exact from article.

Code:
SSH tip #2: SSH tunnel for road warriors

When you're at the mercy of hotel and coffee shop Internet, a nice secure SSH tunnel makes your online adventures safer. To make this work you need a server that you control to act as a central node for escaping from hotspot follies. I have a server set up at home to accept remote SSH logins, and then use an SSH tunnel to route traffic through it. This is useful for a lot of different tasks. For example I can use my normal email client to send email, instead of hassling with Web mail or changing SMTP server configuration, and all traffic between my laptop and home server is encrypted. First create the tunnel to your personal server:


carla@hotel:~$ ssh -f carla@homeserver.com -L 9999:homeserver.com:25 -N
This binds port 9999 on your mobile machine to port 25 on your remote server. The remote port must be whatever you've configured your server to listen on. Then configure your mail client to use localhost:9999 as the SMTP server and you're in business. I use Kmail, which lets me configure multiple SMTP server accounts and then choose which one I want to use when I send messages, or simply change the default with a mouse click. You can adapt this for any kind of service that you normally use from your home base, and need access to when you're on the road.
the port -L 9999 in this example is used for his e-mail, but cant I do something similar for X11 forwarding, and if so do I need to edit the xorg.conf to listen on that new port?

Thanks in advance for the feedback and guidance.
 
Old 04-24-2012, 07:52 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you don't do that for X11, as X11 forwarding is built in to SSH directly, with the -X (or -Y) option. There's no need to forward any ports at all.
 
Old 04-24-2012, 07:57 AM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Original Poster
Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
howto configure putty to forward X11. sadly our servers use scoansi with some other nasty configuration settings for the user profile (dont ask to long a story) so we putty over. i run FC15 as my desktop and have yet to be successful getting my putty to perform X11 forwarding.

any suggestions around this?
 
Old 04-24-2012, 08:05 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
I don't really understand the situation TBH, PuTTY has options to forward X11, so if the character set is something screwing that up, I don't have experience in that area to comment.
 
Old 04-24-2012, 08:11 AM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Original Poster
Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
ahh found some X11 forwarding, what should I put for the x display location? 0:0 or localhost, sorry im more then blonde this morning.
 
Old 04-24-2012, 08:18 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
if your genuninely forwarding then it should sort it out for you. This is PuTTY on Linux right? As I read it you have to use PuTTY becuase of the weird SCO ANSI mapping?
 
Old 04-24-2012, 08:18 AM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Original Poster
Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
nm, ignore my last post, problem solved. turns out the server we use to get to our clients is not configured for X11 forwarding and I dont have root access to enable it. Sorry to bother you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh X11 forwarding of the kdm logon screen? and how to change port 6000? nass Linux - Software 1 04-24-2007 09:19 PM
Unable to get X11 port forwarding to work in SSH Windowns Solaris / OpenSolaris 19 09-28-2006 05:52 AM
router port forwarding/ssh epoo Slackware 7 12-30-2003 03:02 PM
Port Forwarding/Mapping jmosher Linux - General 0 07-15-2003 09:52 AM


All times are GMT -5. The time now is 05:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration