Linux X11 Connection Rejected Because of Wrong Authentication Error and Solution

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 为主机名


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值