We have 2 environments, both showing the same problem.
ENV 1. Jenkins worker is in a Docker Container, running on a linux server
ENV 2. Jenkins worker is a K8s pod.
The `container` the work is being ran from is the same in each env. This is the same container I am using locally to test.
We have tons of jobs that all use this same `ssh through a bastion` setup, but for some reason, just this one is having problem, even though other jobs, targeting the same servers are working fine.
We generate a ssh.cfg, which specifies the bastion and its configurations. The exact commands below, run just fine on everyone laptops, fail in the Jenkins pipeline.
When running `-vvv` you can copy/paste the SSH command it connects just fine.
Errors look like this, someones its all servers, sometime a few.
TASK [Set Fact - Public key] ***************************************************
Tuesday 07 December 2021 19:56:53 +0000 (0:00:00.018) 0:00:04.729 ******
ok: [ip-172-16-0-10.us-gov-west-1.compute.internal]
ok: [ip-172-16-1-5.us-gov-west-1.compute.internal]
ok: [ip-172-16-1-10.us-gov-west-1.compute.internal]
ok: [ip-172-16-0-5.us-gov-west-1.compute.internal]
TASK [Remove New Authorized Keys file if exists] ******************************
Tuesday 07 December 2021 19:56:54 +0000 (0:00:00.054) 0:00:04.784 ******
changed: [ip-172-16-0-10.us-gov-west-1.compute.internal]
fatal: [ip-172-16-1-5.us-gov-west-1.compute.internal]: UNREACHABLE! => {
"changed": false,
"unreachable": true
}
MSG:
Data could not be sent to remote host "172.16.1.5". Make sure this host can be reached over ssh: Connection timed out during banner exchange
ok: [ip-172-16-1-10.us-gov-west-1.compute.internal]
fatal: [ip-172-16-0-5.us-gov-west-1.compute.internal]: UNREACHABLE! => {
"changed": false,
"unreachable": true
}TASK [Set Fact - Public key] ***************************************************
Tuesday 07 December 2021 19:56:53 +0000 (0:00:00.018) 0:00:04.729 ******
ok: [ip-172-16-0-10.us-gov-west-1.compute.internal]
ok: [ip-172-16-1-5.us-gov-west-1.compute.internal]
ok: [ip-172-16-1-10.us-gov-west-1.compute.internal]
ok: [ip-172-16-0-5.us-gov-west-1.compute.internal]
TASK [Remove New Authorized Keys file if exists] ******************************
Tuesday 07 December 2021 19:56:54 +0000 (0:00:00.054) 0:00:04.784 ******
changed: [ip-172-16-0-10.us-gov-west-1.compute.internal]
fatal: [ip-172-16-1-5.us-gov-west-1.compute.internal]: UNREACHABLE! => {
"changed": false,
"unreachable": true
}
MSG:
Data could not be sent to remote host "172.16.1.5". Make sure this host can be reached over ssh: Connection timed out during banner exchange
ok: [ip-172-16-1-10.us-gov-west-1.compute.internal]
fatal: [ip-172-16-0-5.us-gov-west-1.compute.internal]: UNREACHABLE! => {
"changed": false,
"unreachable": true
}