ansible Failed when connected to H3C switch by ssh

image

  1. ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=user1 -o ConnectTimeout=5 -o ControlPath=/root/.ansible/cp/4c801cc0ae 1.1.1.1 ‘/bin/sh -c ‘"’“‘echo ~$USER && sleep 0’”’"‘’

  2. ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=user1 -o ConnectTimeout=5 -o ControlPath=/root/.ansible/cp/4c801cc0ae 1.1.1.1

Why dose 1st one fail but 2nd succeed,Is that a BUG in ansible version 2.5.3?

ansible-version