0 Refrence
http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/
http://hi.baidu.com/ppl309/item/8f0d6d55e671f2464fff2043
1
Q. I'm trying to login to my remote Ubuntu Linux server from Mac OS X desktop using following command:
ssh -X user@vpn.officeserver.example.com xeyes
But I'm getting an error that read as follows:
X11 connection rejected because of wrong authentication.
How do I fix this error?
A. This error can be caused by various factors. Try following solutions:
Make sure you are not running out of disk space
Run df and make sure you have sufficient disk space:
$ df -H
If you are low on disk space remove unnecessary files from your system.
Make sure ~/.Xauthority owned by you
Run following command to find ownweship:
$ ls -l ~/.Xauthority
Run chown and chmod to fix permission problems
$ chown user:group ~/.Xauthority
$ chmod 0600 ~/.Xauthority
Replace user:group with your actual username and groupname.
Make sure X11 SSHD Forwarding Enabled
Make sure following line exists in sshd_config file:
$ grep X11Forwarding /etc/ssh/sshd_config
Sample output:
X11Forwarding yes
If X11 disabled add following line to sshd_cofing and restart ssh server:
X11Forwarding yes
Make sure X11 client forwarding enabled
Make sure your local ssh_config has following lines:
Host *
ForwardX11 yes
Finally, login to remote server and run X11 as follows from your Mac OS X or Linux desktop system:
ssh -X user@remote.box.example.com xeyes
1、看/etc/hosts中是否有127.0.0.1 localhost.localdomain localhost,没有则
配置主机名;
编辑配置文件:
/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost
192.2.3.38 gxnndb gxnndb.happyu.cn gxnndb
其中 192.2.3.38 为本机地址,gxnndb 为主机名