gpt4 book ai didi

ssh - SSH -X 和 ssh -Y 的区别

转载 作者:行者123 更新时间:2023-12-04 00:52:57 53 4
gpt4 key购买 nike

关闭。这个问题是off-topic .它目前不接受答案。












想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。

8年前关闭。



Improve this question




我通过运行这样的代码 SSH 进入服务器:

ssh serverUser@serverIP "./runServer" &

当我在客户端启动 VM 并在其上写入 startX 时,脚本的下一行显示: X Error of failed request: Bad Window.
查找此错误后,我通过使用“Y”转发进行 ssh 解决了此问题。
ssh -Y serverUser@serverIP "./runServer" &

我无法理解 X 和 Y 转发是否是相同的概念 - 有多少这样的 X、Y Z 转发是可能的?

谢谢。

最佳答案

从手册页:

 -X      Enables X11 forwarding.  This can also be specified on a per-host
basis in a configuration file.

X11 forwarding should be enabled with caution. Users with the
ability to bypass file permissions on the remote host (for the
user's X authorization database) can access the local X11 display
through the forwarded connection. An attacker may then be able
to perform activities such as keystroke monitoring.

For this reason, X11 forwarding is subjected to X11 SECURITY
extension restrictions by default. Please refer to the ssh -Y
option and the ForwardX11Trusted directive in ssh_config(5) for
more information.

-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not
subjected to the X11 SECURITY extension controls.

另见: https://askubuntu.com/questions/35512/difference-between-ssh-y-and-ssh-x

关于ssh - SSH -X 和 ssh -Y 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13425820/

53 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com