Chinaunix
标题:
ssh -X 不能用
[打印本页]
作者:
amarant
时间:
2015-11-30 16:18
标题:
ssh -X 不能用
本帖最后由 amarant 于 2015-11-30 16:19 编辑
remote host: /etc/ssh/sshd_config:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
AddressFamily inet
复制代码
报错信息:
user@~$ echo $DISPLAY
:10.0
user@~$ gedit
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
** (gedit:31637): WARNING **: Command line `dbus-launch --autolaunch=2118b476d31fdea211836b0500000006 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
Cannot open display:
Run 'gedit --help' to see a full list of available command line options.
复制代码
把 DISPLAY 变量修改后,不会报错,但是也不会在本地机器弹出gedit,有人遇到这样的问题吗,怎么解决?
user@~$ export DISPLAY=':11.0'
user@~$ gedit
复制代码
作者:
amarant
时间:
2015-12-02 11:34
最新测试,
ssh -X user@localhost
也一样不能正常工作。
估计是 localOS 的问题。(ubuntu 15.10)
作者:
amarant
时间:
2015-12-03 15:09
结帖:
先把.ssh目录备份
mv .ssh .ssh_bak
然后删除.Xauthority文件:
rm -f ~/.Xauthority
然后再使用ssh登陆:
ssh -X user@host
这个时候就会重新生成有效的.Xauthority文件。然后就可以开开心心的have fun了
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2