Skip to main content

Fix ssh -Y with other Macs OSX 10.8 Mountain Lion

You may have realised that when you try use ssh -Y on another Mac from Mountain Lion you get the following error :

Warning: No xauth data; using fake authentication data for X11 forwarding.X11 forwarding request failed on channel 0




Fixing this error only takes some simple configuration. All you have to do is add these lines to the following files on both machines:

/etc/sshd_config

X11Forwarding yes
XauthLocation /opt/X11/bin/xauth
XauthLocation /usr/X11R6/bin/xauth


/etc/ssh_config

XauthLocation /opt/X11/bin/xauth
XauthLocation /usr/X11R6/bin/xauth


That should be all you need to get rid of the authentication error. Hope this was helpful.

Comments

  1. Thanks! This worked like a charm. It's been driving me crazy. Grateful for your post.

    ReplyDelete
  2. Do these instructions assume that I've already installed XQuartz? If 10.8 doesn't ship with X11 any more, what's all that in the /usrX11 and /usr/X11R6 directories? And why do you refer to the directory /opt/X11 - are you assuming the machine I'm ssh-ing into is running Linux (my Mac doesn't have an /opt directory). Needless to say, just following these instructions didn't allow me to ssh -X ... into my work!

    ReplyDelete
    Replies
    1. You do need XQuartz installed at which point /opt/X11 will exist, this was done Mac to Mac.

      Delete
  3. Hello,
    The error message did actually disappear, but I still can't forward my app trough the ssh tunnel.
    For example, I log via ssh to my distant Mac and I would like to use Calculator. How do I do to actually see the Calculator window on my local Mac ? Would you have an example to give me ?
    I would be very pleased. Thank you

    ReplyDelete
    Replies
    1. First off you need to make sure that the calculator is an x11 app. If so , simply ssh -Y into the machine and launch the calculator from the terminal. Unfortunately only x11 apps can be used in this way.

      Delete
    2. Oh, thank you very much for your answer. The applications I tried must not have been x11 apps then.

      Delete

Post a Comment

Popular posts from this blog

Setting up Qt Creator for assembly

After fiddling with inline asssembly (not very successfully) ,I recently decided to try writing proper assembly and compiling with NASM in Linux. After writing a hello world using gedit and having a terminal open for compiling,linking and running I had a thought.,there has to be a better way to do this. So I tried Qt Creator ,because I know it's easy to add custom build and run commands,and what do you know? I got it to work. Here's how,my screenshots and assembly code are in Linux but the set up should be the same regardless of the operating system,if you are not using Linux then just use the same commands you use to assemble in your operating system. First off ,create a new console application: I named mine ASM Rename the main.cpp to main.asm and delete all the text inside.then insert some assembly: Now open up the “Project” tab and edit the build settings,remove the current build and clean steps and remove the “-build-desktop” from the en

Using delegates in Objective-C

Why use delegation? Well when writing Objective-C programs in Xcode we are encouraged to use the MVC(Model View Controller) structure.In MVC a model cannot send messages directly to a specific controller.This can become a problem if data in your model changes independantly and you need to update this information in your view via the controller(The model must never communicate directly with the view).This is where a delegate comes in,it allows messages to be sent from the model to a controller that is not specified in the model but is rather specified by the controller,in other words the controller specifies itself. If you dont really understand what im talking about so far ,don't worry.I didn't understand delegates either until I needed one,but hopefully by the end of this tutorial you will understand not only how to use a delegate ,but the reason you would want to use one. Program breakdown For this tutorial we will write a program that has a model that will change an

Software Developers Experience building a robot Part 2(Tank treads and blue smoke)

Tanked As I mentioned in  part 1 , I had drawn the conclusion that legs were not what I wanted and that tank treads are probably the most overkill for weight bearing. So , I ordered a Rover 5 base. Rover 5 robot base Unforeseen requirements When the Rover base arrived I opened the box to discover something I had completely overlooked; I didn't have a motor controller. With no clue of what an H-Bridge was and a new found determination I decided to build my own motor controller using about 6 relays. It was finally time to get serious about soldering on those proto-boards. I used a breadboard to prototype a system that used 6 relays and 4 transistors. You could hear the loud clickity clack of the relays as the direction changed but I was pretty proud of my ingenuity. It was time to solder! This was the most intricate soldering task I had ever undertaken and it really showed that I'm more of a software kind of guy. I perceived it to be the longest time I have eve