I want to use 2 jumphost with load balancing For example : I want to use jumphost1 by default, if the jumphost1 is down or unreachable I want to use automaticly the jumphost2
I've try this configuration but it doesn't work
Btw, i've renamed hostname/username for confidentiality so don't worry, there is no error with this.
Host jumphost1
HostName jumphost1
User myuser
IdentityFile ~/.ssh/id_ed25519_wsl_jumphost
Host jumphost2
HostName jumphost2
User myuser
IdentityFile ~/.ssh/id_ed25519_wsl_jumphost
Host remote_server
HostName remote_server
User ubuntu
IdentityFile ~/.ssh/id_ed25519_wsl_my_key
ProxyJump jumphost1,jumphost2
ssh connection
ssh -vvv remote_server
OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/myuser/.ssh/config
debug1: /home/myuser/.ssh/config line 14: Applying options for remote_server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Setting implicit ProxyCommand from ProxyJump: ssh -J jumphost1 -vvv -W '[%h]:%p' jumphost2
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/myuser/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/myuser/.ssh/known_hosts2'
debug1: Executing proxy command: exec ssh -J jumphost1 -vvv -W '[remote_server]:22' jumphost2
debug1: identity file /home/myuser/.ssh/id_ed25519_wsl_my_key type 3
debug1: identity file /home/myuser/.ssh/id_ed25519_wsl_my_key-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.4
OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/myuser/.ssh/config
debug1: /home/myuser/.ssh/config line 8: Applying options for jumphost2
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Setting implicit ProxyCommand from ProxyJump: ssh -vvv -W '[%h]:%p' jumphost1
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/myuser/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/myuser/.ssh/known_hosts2'
debug2: resolving "jumphost1" port 22
debug3: resolve_host: lookup jumphost1:22
debug3: ssh_connect_direct: entering
debug1: Connecting to jumphost1 [10.28.34.88] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: connect to address 10.28.34.88 port 22: Resource temporarily unavailable
ssh: connect to host jumphost1 port 22: Resource temporarily unavailable
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
I've tried several configuration, but I'm still struggling to make it works Help would be appreciate ! Ty