PSMP - Ansible with PSMP

PSMP - Ansible with PSMP

123
Created On 11/10/26 11:01 AM - Last Modified 11/10/26 15:54 PM


Symptom


The use of Ansible with PSMP-SSH with SSH keys may not work.



Environment


12.0;12.1;12.2 PSMP

Cause


Using PSM-SSH. when Ansible authenticates using SSH keys, the underlying ssh connection uses authentication method called 'publickey'. For example, in order to use this option you can run the following on the terminal:

ssh -o "PreferredAuthentications=publickey" -i <Private key> <connection string>

However, the PSM-SSH server expects the authentication method to be 'publickey,keyboard-interactive':
ssh -o "PreferredAuthentications=publickey,keyboard-interactive" -i <Private key> <connection string>

This cause the Ansible SSH key authentication to fail.



Resolution


A work around to get pass this issue:
Adding an empty/fake password to the Ansible inventory, Ansible will do a fallback - allowing authentication with the method 'publickey,keyboard-interactive'. By that, allowing Successful authentication through the PSM-SSH server.

Note: This should be defined on the variable: ansible_password.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000uexCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail