Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1446116
  • 博文数量: 239
  • 博客积分: 5909
  • 博客等级: 大校
  • 技术积分: 2715
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-24 20:19
文章分类

全部博文(239)

文章存档

2014年(4)

2013年(22)

2012年(140)

2011年(14)

2010年(59)

我的朋友

分类: LINUX

2013-04-23 17:14:19

ssh -X now says "Warning: untrusted X11 forwarding setup failed: xauth key data not generated"

Technical details: ssh tried to run xauth generate to create a untrusted cookie for the session, which failed because the server isn't compiled with the XCSECURITY extension built-in.

X11Forwarding does not work with OpenSSH under Cygwin

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 
or
$ 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
The OpenSSH server must be restarted or SIGHUP'ed to re-read the configuration file after it is changed. Otherwise, ask your administrator to change this for you.

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.


转自:
阅读(6446) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~