# ssh -X stopped working!

## thechris

chris@plutonium chris $ xclock

Xlib: connection to "localhost:11.0" refused by server

Xlib: Invalid MIT-MAGIC-COOKIE-1 key

Error: Can't open display: localhost:11.0

any clues here.  Note that XDM will not run correctly on the server, nor will X.

however this command worked this morning, and now it fails.

----------

## thechris

found more info:

obsidian chris # ssh -X chris@plutonium

This is the Server Plutonium.

If you are not at the Workstation Obsidian

you do not have permission to use or observe

this computer.

Password:

Warning: No xauth data; using fake authentication data for X11 forwarding.

Last login: Tue Jan  4 23:18:37 2005 from obsidian

chris@plutonium chris $ xclock

Xlib: connection to "localhost:12.0" refused by server

Xlib: Invalid MIT-MAGIC-COOKIE-1 key

Error: Can't open display: localhost:12.0

chris@plutonium chris $ man xauth

chris@plutonium chris $

what is xauth.  there are no .Xauthority files in /home/chris or /root.  what happened?

----------

## Esel Theo

Have you tried `ssh -Y'?

I've found, e.g., this reference: http://docs.hp.com/en/T1471-90011/ch01s02.html

----------

## thechris

found the answer yesterday in a matlab unix setup howto.

for unknown reasons, security settings were turned on.  I assume this happened after a reboot, that the security systems were not started on the first run.

on the server, an Xauthauthority file was REQUIRED.  attempting to connect would create one automatically.

in the Xauthority file were entries corresponding to displays.

I had to copy these enetries to the workstation in order to meet the security.

this was all done with xauth.

the issue is that:

1.)  i can now only have 2 connections with X11 forwarding

2.)  I am unsure how to turn this off, or bypass it for the workstation.

I had tried ssh -Y in hopes it would work, but it could not gt around the security system that sprung up.

----------

## gc650

I had a very similar problem after upgrading from xfree to xorg and also solved it using xauth on my local machine:

```
xauth extract - $DISPLAY | rsh otherhost xauth merge -
```

----------

