Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'set up your ~/.ssh/config' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
set up your ~/.ssh/config
Authored by: bogen2 on Jan 15, '03 11:47:55AM

I just don't see how this works. First of all, even with a firewall in front of the X client, I can set the display variable in a normal ssh session and then run any X app successfully, as the firewall will permit all outbound connections and only ssh inbound. Because you are running the app from inside the firewall, it can reach out and connect to port 6000. But I still wanted to make it work, so I used ssh -X host to connect, but nothing changed. I tried setting the display to 0.0 and leaving it blank - didn't work at all. Tried settiing X11Forwarding in both ssh_config and sshd_config and connections work the same as with a normal ssh session. Doing an echo $DISPLAY always shows the address of the X server, not localhost. And netstat on the server shows a connection to port 6000 from the client. Sigh.

What am I doing wrong? I would like to run these sessions inside the ssh tunnel to make sure they are encrypted.



[ Reply to This | # ]
set up your ~/.ssh/config
Authored by: geltmar on Jan 19, '03 06:37:26AM

Try to login with ssh -v -X other.unix.system and watch the extensive debugging information.
I had some similar problem and found out, that xauth was not installed on other.unix.system and the DISPLAY environment was not forwarded because I could not be authenticated.
But maybe the debugging information will point you in another direction. Give it a try.



[ Reply to This | # ]
set up your ~/.ssh/config
Authored by: badragoo on Aug 19, '03 10:21:41PM

So, it's months later. I came across your question because I was having the same problem. My solution was this: Before you get too far in, first make sure you can type the name of a local X11 application (something like xclock) into a prompt in your Terminal.app window and have it appear locally on your X11 desktop.

If you get a "can't open display" error when doing that, then you'll never get it working across a remote connection. So you first need to do something like this (assuming you're using the default csh shell):

setenv DISPLAY :0

This tells Terminal.app to display X11 applications in your local X11 server. Once you get that working, go ahead with your ssh connection to the Unix machine:

ssh -C -X unix.machine.here

Then try to run something simple like xclock remotely (assuming it's installed on your remote unix box. That's all I did to get it working.

-bpd



[ Reply to This | # ]