首页 > TroubleShooting > centos5下用x11 forward的问题

centos5下用x11 forward的问题

2011年4月24日 发表评论 阅读评论

在一台系统是centos5.5(kernel 2.6.18-128 + openssh-server 5.8p1)机器上测试x11 forward,发现始终不成。具体现象是当用命令ssh -Y时报错:“

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

”;当用ssh -X命令时前面还会多一句Warning,具体是啥忘了。用命令ssh -Xv时终于在debug里显示有用信息了:“

debug1: Remote: No xauth program; cannot forward with spoofing.

”,但是服务器上有xauth这个程序呀:/usr/bin/xauth!后来想想,服务器上是自己编的openssh5.8,可能会有些不同,于是试一下:

strings /usr/sbin/sshd | grep xauth

,结果显示如下:

/usr/X11R6/bin/xauth
xauthlocation
maxauthtries
No xauth program; cannot forward with spoofing.

!!!!!
我晕,原来别人找的是/usr/X11R6/bin/xauth!!!!!!这个系统里自然没有,有的是/usr/bin/xauth!好在openssh支持在/etc/ssh/sshd_config里写xauth程序的路径,于是在/etc/ssh/sshd_config中添加一句:

XAuthLocation /usr/bin/xauth

service sshd restart

重启sshd,再尝试x11 forward,一切OK了

原创文章,转载请注明: 转载自嘻嘻哈哈的部落格(blog)

本文链接地址: centos5下用x11 forward的问题

  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word