分类: LINUX
2013-04-23 17:14:19
A1:
Try adding the -v option to ssh, which often pinpoints the reason for a connection problem.
From the ssh man-page : -v Verbose mode. Causes ssh to print debugging messages about its progress. This is helpful in debugging connection, authentication, and configuration problems. Multiple -v options increase the verbosity. The maximum is 3.
A2:
Before establishing the ssh connection the xserver must be started and the environment variable DISPLAY must be set.
$ DISPLAY=localhost:0.0 $ export DISPLAY $ ssh -Y remotehost |
$ DISPLAY=localhost:0.0 ssh -Y remotehost |
A3:
Make sure you're not starting ssh with the option -x (lowercase). This disables X11Forwarding.
A4:
Check that X11Forwarding is not disabled in the ssh client configuration.
The configfiles are by default ~/.ssh/config and /etc/ssh_config. The file in the home directory overrides settings in the global one.
The configfile is split into various sections starting with "Host wildcard". The section applies to all hosts where wildcard matches the hostname.
If this section contains an entry "ForwardX11 no" then X11Forwarding is disabled. To enable it change the entry to:
ForwardX11 yes |
A5:
Check that X11Forwarding is not disabled in the ssh server configuration.
The configfile is by default /etc/ssh/sshd_config. If there is an entry "X11Forwarding no" then X11Forwarding is disabled.
If you have write access to the config file then change it to
X11Forwarding yes |
A6:
[Frederick W. Wheeler] If the remote machine is a Windows machine using Cygwin OpenSSH server, make sure the Cygwin xauth package is installed on the remote machine. The OpenSSH server needs to be able to run xauth to do X11 Forwarding.