rdesktop 因不受信任的证书而中止

rdesktop 因不受信任的证书而中止

我有rdesktopv1.9.0。我正尝试连接到远程 Win10 主机。 rdesktop因以下错误而中止:

rdesktop -v -x -z -E -d domain -u user user.domain.com
Autoselecting keyboard map 'en-us' from locale
is_wm_active(): WM name: awes
Connecting to server using NLA...
Core(warning): Certificate received from server is NOT trusted by this system, an exception has been added by the user to trust this specific certificate.
TLS  Session info: (TLS1.2)-(ECDHE-X25519)-(RSA-SHA256)-(AES-256-GCM)

Failed to initialize NLA, do you have correct Kerberos TGT initialized ?
Failed to connect using NLA, trying with SSL
Failed to connect, CredSSP required by server (check if server has disabled old TLS versions, if yes use -V option).

连接进入加密的 VPN 隧道。远程主机肯定可用,而且我绝对确定远程证书是可信的(但可能已过期)。

我能够使用窗口远程桌面应用程序连接到同一台机器(它显示相同的警告,但提供了忽略证书问题并继续连接的选项)。

我读了man rdesktop几遍,尝试了各种与加密和证书相关的选项(例如-E),但似乎没什么用。互联网搜索也无济于事。

如何强制rdesktop信任远程证书并继续连接到远程主机?

答案1

否,rdesktop 中止的原因有没事做使用证书。(它确实会记住并“信任”单个证书,就像其他客户端一样,并且您的输出表明已经添加了例外。)

这里的问题是 rdesktop 对 NLA(CredSSP)的支持不完整 - 它不支持基于密码的登录所需的 NTLM 身份验证机制,因此它无法像 Windows MSTSC 那样在连接前提示您输入凭据。(而且它的 Kerberos 支持也有点问题。)

换句话说,rdesktop 仅适用于较旧的 XP/2003 登录过程,您需要先建立连接,然后才能看到服务器的登录屏幕。FreeRDP 是更适合连接到现代主机(Windows 7/8/10)的客户端:

xfreerdp /bpp:32 /gfx +aero +fonts /d:domain /u:user /v:user.domain.com [/cert-...]

使用 FreeRDP,您可以添加选项/cert-tofu来实现“首次连接时信任”证书检查(如在 MSTSC 中),或者您可以使用/cert-ignore它来完全禁用证书检查。

如果你必须使用 rdesktop,那么您将必须在 Windows 10 主机上禁用 NLA(“网络级别身份验证”)要求 - 尽管由于攻击面更高,通常不建议这样做。

相关内容