Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

ssh works fine when when I log-in from OSX Lion to Lion or Lion to Ubuntu.

ssh -X (X-forwarding) works fine when I log-in from Lion to Ubuntu.

However, I can't seem to get ssh -X to work from Lion to Lion.

How do I enable X forwarding on OSX Lion so I can run x applications from a remote machine?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

X11 forwarding is disabled per default for OS X SSH servers. Do the following on the remote machine:

sudo vi /etc/sshd_config

Search for the following line and remove the # sign at the beginning, change the no to yes, so that you end up with this:

X11Forwarding yes

Then write the file and quit vim by hitting ESC and typing :wq and hitting return.

Now restart the sshd process by typing:

killall -SIGHUP sshd

This will kill your ssh session, but after that you should be able to use ssh -X as usual. You may get warnings because of missing X authority files.

share|improve this answer
    
works great - tyvm –  kfmfe04 Jan 4 '12 at 15:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.