V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
teliang
V2EX  ›  Linux

问一下 Linux 环境下 rdp 连接 Windows 的问题。求各位大佬指点

  •  
  •   teliang · 2021-09-01 16:07:54 +08:00 · 2480 次点击
    这是一个创建于 957 天前的主题,其中的信息可能已经有所发展或是发生改变。

    公司的生产数据库只能通过远程 Windows,然后在 Windows 上面操作。 但是我用 Linux 怎么都连不上,网上搜了一下好像我也搞不定,求各位大佬指点

    环境是 Ubuntu 20.04.3 LTS

    xfreerdp /u:userName /p:passwd /v:ip:port /relax-order-checks +glyph-cache
    

    错误与如下:

    [15:54:55:804] [3539:3540] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
    [15:54:55:805] [3539:3540] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
    [15:54:55:805] [3539:3540] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
    [15:54:55:805] [3539:3540] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
    [15:54:55:809] [3539:3540] [INFO][com.freerdp.client.x11] - Property 250 does not exist
    [15:54:55:127] [3539:3540] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
    [15:54:55:128] [3539:3540] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
    [15:54:55:128] [3539:3540] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
    [15:54:56:348] [3539:3540] [WARN][com.freerdp.crypto] - Certificate verification failure 'unable to get local issuer certificate (20)' at stack position 0
    [15:54:56:348] [3539:3540] [WARN][com.freerdp.crypto] - CN = BAOLEIJI
    [15:54:57:279] [3539:3540] [INFO][com.freerdp.gdi] - Local framebuffer format  PIXEL_FORMAT_BGRX32
    [15:54:57:279] [3539:3540] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_RGB16
    [15:54:57:492] [3539:3540] [INFO][com.winpr.clipboard] - initialized POSIX local file subsystem
    [15:54:57:494] [3539:3540] [INFO][com.freerdp.channels.rdpsnd.client] - [static] Loaded fake backend for rdpsnd
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.core.update] - SECONDARY ORDER [0x03] Cache Glyph failed
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.core.update] - order flags 03 failed
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.core.update] - update_recv_order() failed
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.core.update] - UPDATE_TYPE Orders [0] failed
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.core.rdp] - DATA_PDU_TYPE_UPDATE - update_recv() failed
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.core] - freerdp_check_fds() failed - 0
    [15:54:57:514] [3539:3540] [INFO][com.freerdp.client.common] - Network disconnect!
    [15:54:57:514] [3539:3540] [ERROR][com.freerdp.client.x11] - Failed to check FreeRDP file descriptor
    

    😮‍💨连接个远程真难啊,求各位大佬指导指导

    第 1 条附言  ·  2021-09-04 01:05:41 +08:00

    解决方法好像在这里 [https://github.com/FreeRDP/FreeRDP/issues/3139]

    引用github上的回答:

    For people who may have this kind of issue:

    In your Windows 10 Machine, Go to: System Properties > Remote > Uncheck "Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)"

    Then in your linux machine's terminal, type: xfreerdp /sec:tls /u:{username} /v:{IP}

    I have this kind of issue for a very very long time, and disabling NLA in my windows local machine, and forcing connection to TLS solves my problem.

    I like to use xfreerdp because it has multi-monitor support, unlike remmina.

    Hope this helps everyone.

    20 条回复    2021-09-03 22:38:43 +08:00
    Puteulanus
        1
    Puteulanus  
       2021-09-01 16:11:11 +08:00   ❤️ 1
    要不试试 Docker 起个 Apache Guacamole,支持 RDP 和 VNC
    teliang
        2
    teliang  
    OP
       2021-09-01 16:13:52 +08:00
    @Puteulanus 堡垒机这块是领导弄的,要弄新的有点麻烦
    clino
        3
    clino  
       2021-09-01 16:14:42 +08:00
    我用的客户端是 remmina ,长期使用,除了使用 256 色连接桌面进程会挂住,其他没碰到太多问题,推荐一下
    teliang
        4
    teliang  
    OP
       2021-09-01 16:17:10 +08:00
    @clino 我用 remmina 也连不上,remmina 使用 rdp 其实也是用的 freerdp 吧
    Puteulanus
        5
    Puteulanus  
       2021-09-01 16:23:37 +08:00
    @teliang 唔,我的意思是本地起一个当成 RDP 客户端用,如果 Linux 下 RDP 实在难弄,可以作为一个备选方案
    teliang
        6
    teliang  
    OP
       2021-09-01 16:24:54 +08:00
    @Puteulanus 噢噢,我了解一下,这我还真没用过,感谢
    Puteulanus
        7
    Puteulanus  
       2021-09-01 16:32:21 +08:00
    @teliang 小众软件之前推荐过一个基于它的 https://www.appinn.com/next-terminal/ 看起来更方便起一点
    clino
        8
    clino  
       2021-09-01 22:32:19 +08:00
    @teliang 那 rdesktop 试过了吗?
    teliang
        9
    teliang  
    OP
       2021-09-02 09:36:47 +08:00
    @clino 刚试了一下,也不行,日志是这样的:
    ```bash
    Do you trust this certificate (yes/no)? yes
    Connection established using SSL.
    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 53 (X_CreatePixmap)
    Value in failed request: 0x0
    Serial number of failed request: 85
    Current serial number in output stream: 307

    ```
    clino
        10
    clino  
       2021-09-02 14:14:24 +08:00
    找一个 PC 上的 windows 开启远程桌面能连上吗?
    teliang
        11
    teliang  
    OP
       2021-09-02 15:55:59 +08:00
    @clino Windows 相同的账号密码可以连上
    fox0001
        12
    fox0001  
       2021-09-02 23:25:04 +08:00 via Android
    我也是长期使用 remmina,连上公司的 Windows 服务器。
    silkriver
        13
    silkriver  
       2021-09-03 09:43:36 +08:00
    我用 remmina 没有问题,可以试试装 remmina-plugin-rdesktop 据说更可靠
    https://wiki.archlinux.org/title/Remmina_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
    clino
        14
    clino  
       2021-09-03 11:39:25 +08:00
    @teliang 我是说找一台 PC 上的 windows 测试一下,是你本地客户端的问题,还是客户端能连一般的 windows,只是不兼容服务器上的 windows 。
    kkk123
        15
    kkk123  
       2021-09-03 13:01:31 +08:00
    [ERROR][com.freerdp.core.update] - SECONDARY ORDER [0x03] Cache Glyph failed

    是不是开了 Glyph Cache , 这个在 remmina 是默认不选的。
    teliang
        16
    teliang  
    OP
       2021-09-03 13:29:35 +08:00
    @kkk123 不加+glyph-cache 是这个错。

    [13:27:55:453] [1171682:1171682] [INFO][com.freerdp.gdi] - Local framebuffer format PIXEL_FORMAT_BGRA32
    [13:27:55:454] [1171682:1171682] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_RGB16
    [13:27:55:463] [1171682:1171682] [INFO][com.winpr.clipboard] - initialized POSIX local file subsystem
    [13:27:55:465] [1171682:1171682] [INFO][com.freerdp.channels.rdpsnd.client] - [static] Loaded fake backend for rdpsnd
    [13:27:55:142] [1171682:1171682] [WARN][com.freerdp.core.update] - [0x03] Cache Glyph - SERVER BUG: The support for this feature was not announced!
    [13:27:55:142] [1171682:1171682] [ERROR][com.freerdp.core.update] - SECONDARY ORDER [0x03] Cache Glyph failed
    [13:27:55:142] [1171682:1171682] [ERROR][com.freerdp.core.update] - order flags 03 failed
    [13:27:55:142] [1171682:1171682] [ERROR][com.freerdp.core.update] - update_recv_order() failed
    [13:27:55:142] [1171682:1171682] [ERROR][com.freerdp.core.update] - UPDATE_TYPE Orders [0] failed
    [13:27:55:142] [1171682:1171682] [ERROR][com.freerdp.core.rdp] - DATA_PDU_TYPE_UPDATE - update_recv() failed
    [13:27:55:143] [1171682:1171682] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
    [13:27:55:143] [1171682:1171682] [ERROR][com.freerdp.core] - freerdp_check_fds() failed - 0
    [13:27:55:143] [1171682:1171682] [INFO][com.freerdp.client.common] - Network disconnect!
    [13:27:55:143] [1171682:1171682] [ERROR][com.freerdp.client.wayland] - Failed to check FreeRDP file descriptor
    teliang
        17
    teliang  
    OP
       2021-09-03 13:32:46 +08:00 via iPhone
    @clino 额,我用 pc 上的 windows 是可以连到远程服务器的,Linux 连不上
    clino
        18
    clino  
       2021-09-03 14:21:33 +08:00
    @teliang 我的 ubuntu 也是 20.04 ,但是长期连 PC windows 都没问题,你测过连非服务器的吗?就连一般的 PC windows 。
    teliang
        19
    teliang  
    OP
       2021-09-03 17:42:11 +08:00
    @clino 我装了个 Windows 虚拟机试了一下,Ubuntu 可以远程到虚拟机上,虚拟机也可以远程连接到服务器,但是 Ubuntu 连不到服务器。。。
    clino
        20
    clino  
       2021-09-03 22:38:43 +08:00
    那看来就是 ubuntu 的 rpd 客户端和你服务器上的 windows 不兼容了.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3779 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 04:29 · PVG 12:29 · LAX 21:29 · JFK 00:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.