LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 02-15-2014, 05:49 PM   #1
iLuvDebian
LQ Newbie
 
Registered: Feb 2014
Posts: 8

Rep: Reputation: Disabled
Can a x11 terminal be tunneled through ssh?


hi

I am aware that some applications can be tunneled through a ssh server for encrypted traffic like web browsers for example.

I want to know if it is possible to tunnel a x11 terminal window like Konsole for example through a ssh server.

THanks
 
Old 02-15-2014, 06:30 PM   #2
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
Have you looked at the -X option on the ssh command?
 
1 members found this post helpful.
Old 02-15-2014, 06:52 PM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
To be more explicit than rigor I did just that (ran konsole from my other machine through SSH) just this minute. So, yes, it works just like any other X11 application.
 
Old 02-15-2014, 07:25 PM   #4
iLuvDebian
LQ Newbie
 
Registered: Feb 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Do I need to comment out these two lines from /etc/ssh/sshd_config first before using the -X switch ?

#AllowTcpForwarding yes
#X11Forwarding yes
 
Old 02-15-2014, 07:30 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I don't know what AllowTcpForwarding so I would say you probably don't need it but X11Forwarding is precisely what you are indicating you want.
 
Old 02-15-2014, 07:41 PM   #6
iLuvDebian
LQ Newbie
 
Registered: Feb 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
OK

Thanks to both of you
 
Old 02-15-2014, 08:51 PM   #7
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Although it is not what you asked for, a 'better solution' is to use gnu screen or tmux

Currently you will lose your session if the connection drops for any reason.

With screen, the session will still be active, and you can reattach once the connection is re-established.

Takes a little getting used to, but well worth it
Read up on gnu screen, you will probably find you don't need to forward konsole

Note, I assume you want the tabs that konsole offers

My ~/.screenrc
Code:
termcapinfo xterm* ti@:te@ltscreen on
term screen-256color
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %Y-%m-%d %{W}%c %{g}]'
Gives you a nice 'statusbar' which helps you see your tabs
 
1 members found this post helpful.
Old 02-16-2014, 06:45 AM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Good call Firerat. I think screen is a must where the possibility of a dropped connection exists. The split-screen and other options are very useful too.
 
  


Reply



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
access ssh tunneled location trough lan Steviepower Linux - Networking 3 11-09-2010 06:14 AM
root terminal has different bash config when I ssh in vs su from another ssh account stardotstar Linux - General 4 07-01-2010 06:24 PM
Getting X to work through tunneled VNC over SSH connection Brian5 Linux - Server 5 09-19-2007 04:08 AM
no x11 terminal in gnuplot 4.0.0 polzbert Linux - Software 1 01-10-2006 04:54 AM
Cannot Get into X11 as well as to terminal--Some Space error it shows covaigold Linux - Software 0 02-19-2005 09:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:08 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
Open Source Consulting | Domain Registration