0

Gradle ssh plugin: works for T-mobile, not working for Google-Fi.

With google FI, WinSCP can connect to linux server without problem, and PuTTY works too. But gradle ssh plugin could not connect to server using the same key. T-mobile works fine for gradle ssh plugin.

remotes {
    server1 {
        host = 'mycompany.com'
        port = 22
        user = 'user1'
        identity = new File('c:/key1.pem')
    }
}

ssh.run {
    session(remotes.server1) {
        get from: "/path/foo", into: 'c:/temp/'
    }
}

Error:

com.jcraft.jsch.JSchException: java.net.ConnectException: Connection timed out: connect

Why google FI not working?

eastwater
  • 4,624
  • 9
  • 49
  • 118

1 Answers1

0

Possibly IPv6 vs IPv4 issue. The hostname might have both addresses and Gradle might pick different one than the PuTTY/WinSCP.

Try using either IP address instead of the hostname.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992