我通过运行这样的代码来SSH服务器:
ssh serverUser@serverIP "./runServer" &
在脚本的下一行,当我在客户端启动VM并在其上写入startX时,它说:X Error of failed request: Bad Window.
在查找此错误后,我通过使用“Y”转发进行sshing来解决此问题。
ssh -Y serverUser@serverIP "./runServer" &
我无法理解X和Y转发是否是相同的概念 - 以及有多少这样的X,Y Z转发是可能的?
感谢。
答案 0 :(得分:15)
从手册页:
-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