Closed ritouret closed 9 months ago
The answer is YES.
Just remove " character and it goes well : --sshcli-option='-o=ProxyCommand=/usr/bin/ssh -W %h:%p svc_centreon@IP_REBOND -o=IdentityFile=/var/lib/centreon-gorgone/.ssh/id_rsa_rebond_outscale -o=StrictHostKeyChecking=no -o=UserKnownHostsFile=/dev/null'
instead of
--sshcli-option='-o=ProxyCommand="/usr/bin/ssh -W %h:%p svc_centreon@IP_REBOND -o=IdentityFile=/var/lib/centreon-gorgone/.ssh/id_rsa_rebond_outscale -o=StrictHostKeyChecking=no -o=UserKnownHostsFile=/dev/null"'
Hello,
I have to discover FS on new LINUX servers at Outscale but i have to use a proxy "rebond" server to use TCP port 22.
From centreon-gorgone user on central server, i can ssh on IP_REBOND and then ssh on IP_POLLER using "svc_centreon" account with ssh-priv-key (no password asked on prompt) with this command : ssh svc_centreon@IP_POLLER -i /var/lib/centreon-gorgone/.ssh/id_rsa_rebond_outscale -o=StrictHostKeyChecking=no -o=UserKnownHostsFile=/dev/null -o=ProxyCommand="/usr/bin/ssh -W %h:%p svc_centreon@IP_REBOND -o=IdentityFile=/var/lib/centreon-gorgone/.ssh/id_rsa_rebond_outscale -o=StrictHostKeyChecking=no -o=UserKnownHostsFile=/dev/null"
The command used for FS discovery is the following : /usr/lib/centreon/plugins/centreon_linux_local.pl --plugin=os::linux::local::plugin --mode=check-plugin --ssh-backend=sshcli --hostname=IP_POLLER --command="/usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=list-storages --filter-storage-type=hrStorageFixedDisk --hostname=IP_NEWLINUX --snmp-version=2c --snmp-community=*** --snmp-timeout=15 --snmp-retries=1 --disco-show" --ssh-username=svc_centreon --ssh-priv-key=/var/lib/centreon-gorgone/.ssh/id_rsa_rebond_outscale --sshcli-option='-o=StrictHostKeyChecking=no' --sshcli-option='-o=UserKnownHostsFile=/dev/null' --sshcli-option='-o=ProxyCommand="/usr/bin/ssh -W %h:%p svc_centreon@IP_REBOND -o=IdentityFile=/var/lib/centreon-gorgone/.ssh/id_rsa_rebond_outscale -o=StrictHostKeyChecking=no -o=UserKnownHostsFile=/dev/null"' --timeout=55 --verbose --debug
Here is the result : /bin/bash: /usr/bin/ssh -W IP_POLLER:22 svc_centreon@IP_REBOND -o=IdentityFile=/var/lib/centreon-gorgone/.ssh/id_rsa_rebond_outscale -o=StrictHostKeyChecking=no -o=UserKnownHostsFile=/dev/null: No such file or directory | 'command1#ssh.response.time.seconds'=0.015s;;;0; kex_exchange_identification: Connection closed by remote host
My Question : can we use this plugin with --sshcli-option value like "-o=ProxyCommand=" ? If yes, i don't understand the "No such file or directory" error message ...
Thanks.