无法在 Windows git bash 上 运行 ssh -X

Cannot run ssh -X on Windows git bash

我正在尝试打开带显示器的 linode Debian 10。我在 Windows 7.I 上使用 Git Bash 连接到它几乎尝试了所有我能找到的方法,但无法摆脱这个错误

debug1: Authentication succeeded (password).
Authenticated to 66.228.51.35 ([66.228.51.35]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: exec
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: No xauth program.
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Linux localhost 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Jun 21 08:56:56 2021 from 49.36.179.155
root@localhost:~#

Xming0.0。这是我的 ssh_config.

# ssh_config(5) man page.

# Host *
   ForwardAgent yes
   ForwardX11 yes
   PasswordAuthentication yes
   XAuthLocation /opt/X11/bin/xauth
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
   Port 22
   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
# Added by git-extra
Ciphers +aes128-cbc,3des-cbc,aes256-cbc,aes192-cbc

server也是一样。不知道还能做什么才能让它发挥作用。我不太清楚在 Windows 上的 bash 中添加 export DISPLAY 的位置..或服务器?

user@user-PC MINGW64 ~/Desktop
$ which xauth
which: no xauth in (/c/Users/user/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/user/bin:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/geckodriver.exe:/c/Program Files/Java/jre1.8.0_271/bin/java:/cmd:/c/Program Files/wkhtmltopdf:/c/Program Files/Liquid Technologies/Liquid Studio 2021/XmlDataBinder19/Redist19/cpp/win32/bin:/c/Program Files/Liquid Technologies/Liquid Studio 2021/XmlDataBinder19/Redist19/cpp/win64/bin:/c/Users/user/AppData/Local/Programs/Python/Python37/Scripts:/c/Users/user/AppData/Local/Programs/Python/Python37:/c/Program Files/JetBrains/PyCharm Community Edition 2020.3/bin:/c/Users/user/AppData/Local/Programs/Microsoft VS Code/bin:/c/Program Files/poppler-0.68.0/bin:/c/Program Files/wkhtmltopdf:/c/Program Files/gs/gs9.54.0/bin:/c/Program Files/poppler-0.68.0/bin:/usr/bin/vendor_perl:/usr/bin/core_perl)

ssh -Y(不是-X)的目的是让您要连接的主机在您自己的显示器上打开 X11 windows。为此,您的计算机必须是 运行 X 服务器。例如,在 macOS (Darwin) 上,您将启动 XQuartz。然后 ssh 命令可以通过环境变量和其他巧妙的技巧提供一个通信通道,目标机器上的 X 客户端程序可以通过该通道在您的笔记本电脑上的服务器上打开 windows。

要在 PC 上与 Windows 一起使用,您需要在 PC 上安装 X 服务器。这可能的;参见 this Google search for instance. You mentioned Xming; this superuser.com Q&A 有一些使用 Xming 的设置信息。