You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04作为X2Go客户端连接Debian X2Go服务器时提示Connection refused的排查咨询

Ubuntu 22.04作为X2Go客户端连接Debian X2Go服务器时提示Connection refused的排查咨询

Hey John, let's work through this "Connection refused" issue step by step. Since you're on the same LAN and the Debian server has port 22 open, here are some client-side checks and quick cross-verifications to try:

  • Double-check your X2Go client configuration

    • Make sure you're using the Debian server's local LAN static IP in the client settings, not its public NAT address. Public NAT addresses often don't route correctly within the same local network—this is a super common gotcha!
    • Verify that the connection protocol is set to SSH (X2Go uses SSH under the hood) and the port is explicitly set to 22. It's easy to accidentally tweak this setting without noticing.
  • Test basic SSH connectivity first

    • X2Go relies entirely on SSH, so if SSH can't connect, X2Go won't either. Open a terminal on your Ubuntu 22.04 machine and run:
      ssh your_debian_username@debian_lan_ip
    • If this also throws "Connection refused", first confirm you can ping the Debian server's LAN IP (ping debian_lan_ip). If ping fails, you've got a basic network reachability issue to fix first. If ping works but SSH fails, it might be a server-side firewall rule blocking your Ubuntu client's IP (even if port 22 is open globally) or the SSH service isn't running—though you mentioned port 22 is open, it's worth double-checking the server's SSH status too.
  • Check Ubuntu client's firewall settings

    • Even as the connecting client, a strict UFW firewall on Ubuntu might block outbound SSH traffic. Try temporarily disabling UFW to test:
      sudo ufw disable
    • If the connection works after this, you'll need to add a rule to allow outbound SSH:
      sudo ufw allow out 22/tcp
    • Then re-enable UFW:
      sudo ufw enable
  • Verify X2Go client installation integrity

    • Sometimes missing dependencies or corrupted installs can cause odd connection errors. Reinstall the X2Go client on Ubuntu to rule this out:
      sudo apt remove --purge x2goclient && sudo apt install x2goclient
  • Quick server-side sanity check (worth confirming)

    • While you asked about client-side steps, make sure the X2Go server service on Debian is actually running. On the Debian machine, run:
      systemctl status x2goserver
    • If it's inactive, start it with sudo systemctl start x2goserver and set it to launch on boot: sudo systemctl enable x2goserver

备注:内容来源于stack exchange,提问作者John Rose

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 07:23:12