如何在AIX上通过SSHconfigurationX11转发?

这是我试过的。

我在远程AIX系统上编辑了/ etc / ssh / sshd_config

X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes 

以及设置$ DISPLAY

 DISPLAY=localhost:10.0 export DISPLAY 

…重启

通过RHEL连接

 ssh -X me@hostname 

运行xclock

 xclock 

得到以下输出:

 X11 connection rejected because of wrong authentication. X connection to localhost:10.0 broken (explicit kill or server shutdown) 

xauth list不打印任何东西。

 DISPLAY=localhost:10.0 export DISPLAY 

我认为这是在你的shell启动文件( .bash_profile或类似的)? 尝试删除它。 ssh -X自动为转发X的会话设置此variables。您不必手动设置此variables,而可能将其设置为错误的值。

通过背景,X的默认TCP端口是6000,对应于“localhost:0.0”。 ssh -X通常从端口6010开始,对应于“localhost:10.0”,并向上工作,直到find空闲端口。 如果端口6010正在使用,那么它可能会绑定到6011,并将DISPLAY设置为“localhost:11.0”。 这就是为什么你应该让ssh为你设置DISPLAY。

您必须确保您的AIX服务器的Windowspipe理器正在工作。 例如,如果您使用CDE,请使用netstat -an | grep 177来检查正在监听的端口。

然后你可以键入xhost +来禁止访问控制。

最后,尝试使用Xmanagerlogin,xstart和xbrowser都可以。 如果您使用xstart,则应首先运行Xmanager-passive ,然后select该命令作为CDE 。 如果使用xbrowser,则可以selectSecure XDMCP作为login方法。