Q:

Xforwarding in Ubuntu

I'm trying to get Xforwarding working in Ubuntu... On the server I have uncommented the following lines of /etc/ssh/sshd_config:
X11Forwarding yes
AllowTcpForwarding yes

Now I try to ssh in, but I get the following error messages (and Xforwarding isn't working).
$ssh -Y example.com
/usr/bin/xauth:  /home/dan/.Xauthority not writable, changes will be ignored

$ssh -X example.com
/usr/bin/xauth:  error in locking authority file /home/dan/.Xauthority

Any suggestions?
Thanks

A:

Looking at the error messages, I'd have to guess that ~/.Xauthority is not owned by you. It should be, with 600 permissions.
I think your best solution is to delete it. The next time that you connect with ssh -X, you should see the message "creating new authority file", and everything should be fine.
Incidentally, my Ubuntu 9.10 installation has port forwarding and X11 forwarding enabled out of the box. I can't remember what I did to my 8.04LTS installation, but I'm pretty sure that my only change was to add another port for inbound SSH.

