• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

ssh into OS X with X tunneling

icarus4586

Senior member
I have a Mac at home that already has sshd enabled, so that I can connect to it remotely with SSH. I also have X11 installed on it. When you SSH into a usual Unix/Linux box running X11, you can use the -X or -Y flag to enable X tunneling. When I use this flag when I SSH into my Mac, it appears to work (no error messages anyway), but if I run a program that uses X, it never comes to my screen here. Any insight?
 
-X is supposed to set $DISPLAY for you.

Is there another box you can test with, or even try tunneling in the reverse direction?
 
On the machine I'm on now, $DISPLAY = :0.0
On my mac, $DISPLAY wasn't set, so I set it to (my ip address here):0.0

It still doesn't seem to be working tho.
 
Follow these steps and paste the terminal output:
-----------------
xhost +
ssh -X machine
echo $DISPLAY
xterm
-----------------

Show us what happens when you run all that in the same terminal
 
I'm not sure if ssh's command line options supercede the options in sshd_config, so make sure X11 tunneling is enabled there.

-X is supposed to set $DISPLAY for you.

I know, but stuff happens. 😉
 
$ xhost +
access control disabled, clients can connect from any host

$ ssh -X -l (username) (mac's hostname)
Password:
Last login: Thu Aug 10 09:04:12 2006 from (ip-address)
Welcome to Darwin!
adding /sw/bin to PATH...
done

ntp0166@razor:~
$ echo $DISPLAY


ntp0166@razor:~
$ xterm
-bash: xterm: command not found
 
No display is set and you don't have xterm in your path. Seems to be a larger problem here. See the info below.

OSX stuff

EDIT: Well, nevermind. None of that is going to be any help. Sorry.
 
n0cmonkey hit the nail on the head. I edited /etc/sshd_config to enable X tunneling and set display offset, and it works now.

Thanks!
 
Back
Top