SSH -X“警告:不受信任的 X11 转发设置失败:未生成 xauth 密钥数据" [英] SSH -X "Warning: untrusted X11 forwarding setup failed: xauth key data not generated"

查看:64
本文介绍了SSH -X“警告:不受信任的 X11 转发设置失败:未生成 xauth 密钥数据"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我在使用 ssh X 转发时遇到问题.设置是我在 OSX Yosemite 主机上ssh进入我的 ubuntu VM.

Hey I'm having an issue getting ssh X forwarding to work. The setup is I'm sshing into my ubuntu VM off OSX Yosemite host machine.

我已经在 OSX 上安装了 xQuartz,在 ubuntu 上安装了 xauth,而且我相信我已经在 ssh_config 文件中设置了所有正确的选项.

I already installed xQuartz on OSX, xauth on ubuntu, and I believe I've have all the correct options set in ssh_config files.

我明白了

Warning: untrusted X11 forwarding setup failed: xauth key data not generated
X11 forwarding request failed on channel 0

使用 ssh -X 打开连接时的消息,以及当我尝试运行 X 应用程序时的消息:

message when opening a connection with ssh -X, and when I tried to run an X application:

xterm: Xt error: Can't open display:
xterm: DISPLAY is not set

除了运行 Mavericks 之外,我在我的另一台机器上有相同的设置,它工作正常,有什么特定于 Yosemite 的特定我需要担心吗?

I have the identical setup on my other machine except running Mavericks and it works fine, is there something specific to Yosemite specific I have to worry about?

推荐答案

请注意,一些不完整的答案可能会导致安全漏洞.

Note that some incomplete answers might lead to security flaws.

  1. 使用 ssh -Y 意味着这里有虚假的 xauth 信息,这很糟糕!
  2. ssh -X 应该可以工作,因为 XQuartz 一旦启用,就会使用 xauth.唯一的问题是 ssh 在 /usr/X11R6/bin 中寻找 xauth,而在带有 XQuartz 的 macOS 上,它在/opt/X11/bin
  1. Using ssh -Y means here having fake xauth information which is bad!
  2. ssh -X should work since XQuartz, once enabled, uses xauth. The only problem is that ssh is looking for xauth in /usr/X11R6/bin and on macOS with XQuartz it is in /opt/X11/bin

安全解决方案:

  1. 启用首选项 (Cmd-,) 的 Security 选项卡中的第一个选项,该选项启用经过身份验证的连接.

  1. Enable the first option in the Security tab of preferences (Cmd-,) which enables authenticated connections.

编辑~/.ssh/config,将XAuthLocation/opt/X11/bin/xauth 添加到主机配置中.

Edit ~/.ssh/config, add XAuthLocation /opt/X11/bin/xauth to the host config.

ssh -X your_server 以安全的方式工作.

确保在目标主机上安装了 xauth.

Ensure xauth is installed on the destination host.

这篇关于SSH -X“警告:不受信任的 X11 转发设置失败:未生成 xauth 密钥数据"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆