[SOLVED] ssh with port mapping for X11 forwarding to bypass router
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.