很多网上都说X11Forwarding yes打开即可,可以是机器还是报SSH reject.
最后多次试验,终于解决了问题:
后来把内容改为:
AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
再配置GDM
GDM (Ubuntu 10.10 and previous releases)
If you are using Ubuntu 11.10 or later releases, skip to the '
Configure LightDM
' section.
Open the following GDM configruation file
Ubuntu 8.x: /etc/gdm/gdm.conf-custom or /etc/X11/gdm/gdm.confUbuntu 9.1, 10.04, 10.10: /etc/gdm/custom.conf
and set Enable to 1 in the [xdmcp] section and DisallowTCP to false in the [security] section as following.
[xdmcp]Enable=1
[security]DisallowTCP=false
*Ubuntu 10.10 had a bug in its GDM (v 2.30.5) that only allowed IPv6 connections which caused Xmanager to fail connecting to the host. This bus was fixed in GDM version 2.32.0.
� Configure LightDM (Ubuntu 11.10 and 12.04)If you are using Ubuntu 10.10 or previous releases, you can skip this part.
Create the /etc/lightdm/lightdm.conf file and save the following lines:
[XDMCPServer]enabled=true
*In order to use Xmanager with LightDM, you must upgrade Xmanager to the latest release. Use the Help > Check for Updates menu to upgrade.