JetBrains Client 远程连接时卡住卡住 trying to connect to remote host

使用JetBrains idea远程开发时遇到的连接问题

配置ssh远程连接时一直卡在连接的地方,测试本机是可以ssh连接的

解决过程

  1. 排查idea日志 Help-> Collect logs and Diagnostic Data 打开日志排查出连接报错日志:

    1
    woke to: Opening `direct-tcpip` channel failed: open failed
  2. google得出可能是 remote host sshd客户端 localhost port forwarding配置问题

  3. 修改 remote host /etc/ssh/sshd_config

    1
    2
    AllowTcpForwarding yes 
    GatewayPorts yes
  4. 重启sshd客户端

    1
    service sshd restart

参考

gateway fails to load and stuck in “trying to connect to remote host”

Donate comment here