Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh and X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
William E. Kempf
n00b
n00b


Joined: 13 Nov 2003
Posts: 3

PostPosted: Thu Nov 13, 2003 3:22 pm    Post subject: ssh and X Reply with quote

I can't seem to get sshd configured properly to allow X forwarding. I've modified /etc/ssh/ssh_config to contain the following:

Host *
ForwardX11 yes
Protocol 2

I restarted sshd with: /etc/init.d/sshd restart. Then, from a remote box I issue: ssh -X user@host.

Once logged onto the box, when I echo $DISPLAY, it's not set. Any attempts to start an X application result in a "can't open display" error. I've scoured the net on this subject, but can't locate anything that helps me. Anyone have any ideas here?
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Thu Nov 13, 2003 6:05 pm    Post subject: Reply with quote

Try to set X11Forwarding to 'yes' also in /etc/ssh/sshd_config.
Bye!
Back to top
View user's profile Send private message
William E. Kempf
n00b
n00b


Joined: 13 Nov 2003
Posts: 3

PostPosted: Thu Nov 13, 2003 6:43 pm    Post subject: Reply with quote

I saw X11Forwarding in a few different posts. But man ssh_config doesn't mention this. Setting it makes no difference.
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Fri Nov 14, 2003 12:14 am    Post subject: Reply with quote

OK here is the run down...

ssh_config is the file that sets your default options when running ssh from the cl. so if you set xforwarding there it automatically includes the -X option that ssh needs to enable xforwarding.

sshd_config is the file that controls the sshd server. you need to enable xforwarding here to be able to run x programs from another computer loged into yours using ssh. you must restart ssh after altering this file.

next when you run ssh on the remote machine then you have to give the -X option to enable xforwarding, unless it is added by default in the ssh_config. another thing to note is that you have to be in an xwindows env to be able to run x programs off your machine through ssh (ie, you cant do this in windows through putty or from a vc.)

hope this helps...

chris
Back to top
View user's profile Send private message
tabascal1
n00b
n00b


Joined: 21 Mar 2003
Posts: 71

PostPosted: Fri Nov 14, 2003 1:41 pm    Post subject: Reply with quote

Is there any means by which one can run X through ssh on a remote winxp machine
Back to top
View user's profile Send private message
William E. Kempf
n00b
n00b


Joined: 13 Nov 2003
Posts: 3

PostPosted: Fri Nov 14, 2003 2:33 pm    Post subject: Reply with quote

Ahh... stupid mistake. sshd_config not ssh_config for the server. I feel stupid now.

tabascal1: Yep, I do it all the time (run remote X applications through ssh on WinXP). There's numerous solutions, including commercial ones, but I personally use Cygwin and the Cygwin XFree86 port.
Back to top
View user's profile Send private message
tabascal1
n00b
n00b


Joined: 21 Mar 2003
Posts: 71

PostPosted: Sat Nov 15, 2003 9:30 am    Post subject: Reply with quote

William: It would be very nice of you if you could send me the details of the same as I am new to this
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Sat Nov 15, 2003 10:29 pm    Post subject: Reply with quote

OK, tabascal1, here's the way to go (or the direction, anyway):
1. go to www.cygwin.com, get the setup.exe for cygwin
2. create a directory, e. g. c:\cygwin_store, drop setup.exe into this directory
3. execute setup.exe. you will be prompted to select a install directory (let's call it c:\cygwin) and a storage directory (use c:\cygwin_store).
4. next, select a download mirror
5. select the packages you would like to install, there is a category for xfree86, best to select everything in it.
6. download & install
7. now create (on the same disc as the cygwin install dir, mark you) a directory called c:\CYGDRIVE (yes, capital letters)
8. when you call the cygwin terminal, you will start in your new home dir on /home/<user>; your win discs are 'mounted' at /cygdrive, you can start your X-Server with startx

But don't expect too much, xfree on cygwin does have some glitches and shortcomings (like clean shutdown or rather the lack thereof).

Have fun!
andy_ypsilon
Back to top
View user's profile Send private message
tabascal1
n00b
n00b


Joined: 21 Mar 2003
Posts: 71

PostPosted: Mon Nov 17, 2003 1:44 pm    Post subject: Reply with quote

Thanks for the help.

I need some clarifications.

I am using PuTTY in WIN XP for connecting over ssh to my gentoo box.

To run X applications on PuTTY do I require an X enviornment in my XP.
If not what are the configurations required on my system.

I have already done X11Forwarding to yes in sshd_config

Please help
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Mon Nov 17, 2003 1:59 pm    Post subject: Reply with quote

Quote:

To run X applications on PuTTY do I require an X enviornment in my XP.

Exactly. And that's why you need Cygwin+XFree86.
Back to top
View user's profile Send private message
gen2newB
Apprentice
Apprentice


Joined: 23 Sep 2003
Posts: 150
Location: Fall River, MA.

PostPosted: Mon Nov 17, 2003 2:00 pm    Post subject: Reply with quote

you might want to try searching for VNC servers. I use PuTTY to create a vpn tunnel to my computer, and then i use port forwarding to pull my desktop up using vnc viewer. If that tickles your fancy, do a search for VNC in Documentation and Tips section and u will not be disappointed ;]
Back to top
View user's profile Send private message
Dafoe
n00b
n00b


Joined: 24 Apr 2003
Posts: 19
Location: Reykjavík, Iceland

PostPosted: Mon Nov 17, 2003 3:55 pm    Post subject: Reply with quote

hi,

i just tried using vncserver on my linuxbox and vncviewer on my xp-laptop and its working great.

for example i started dcgui-qt on my box and started dl-ing, and im wondering what happens if i close the vncviewer window!!

will the processes im running die ?
_________________
regards, arib
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Mon Nov 17, 2003 4:09 pm    Post subject: Reply with quote

No, the process will keep running. The vnc server is running on your linux box as opposed to a normal X server which would be running on your xplaptop. You'll only lose the applications you're running if you kill the vncserver (by doing a vncserver -kill :1 for eg).
Back to top
View user's profile Send private message
Dafoe
n00b
n00b


Joined: 24 Apr 2003
Posts: 19
Location: Reykjavík, Iceland

PostPosted: Mon Nov 17, 2003 4:13 pm    Post subject: Reply with quote

ok, thx buddy
_________________
regards, arib
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum