<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Not able to execute command on FW using ansible due to SSH key auth error in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/not-able-to-execute-command-on-fw-using-ansible-due-to-ssh-key/m-p/329323#M2353</link>
    <description>&lt;P&gt;Advices are deeply appreciated, stuck in this issue for 2-3 days, please find below info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample script###############&lt;/P&gt;&lt;P&gt;- name: running show system info cmd&lt;BR /&gt;hosts: PA&lt;BR /&gt;vars_files:&lt;BR /&gt;- pass.yml&lt;BR /&gt;roles:&lt;BR /&gt;- role: PaloAltoNetworks.paloaltonetworks&lt;BR /&gt;tasks:&lt;BR /&gt;- name: tasks will run now&lt;BR /&gt;panos_op:&lt;BR /&gt;#ip_address: '{{ ip_address }}'&lt;BR /&gt;# username: '{{ username }}'&lt;BR /&gt;password: '{{ password }}'&lt;BR /&gt;cmd: 'show system info'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ansible.cfg output######################&lt;/P&gt;&lt;P&gt;inventory=./hosts&lt;BR /&gt;roles_path=./roles&lt;BR /&gt;interpreter_python=/home/user/venv/bin/python&lt;BR /&gt;#[ssh_connection]&lt;BR /&gt;#ssh_args = -o ControlMaster=no&lt;BR /&gt;#host_key_checking = False&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hosts file output########&lt;/P&gt;&lt;P&gt;[PA]&lt;/P&gt;&lt;P&gt;10.x.x.x&amp;nbsp; &amp;nbsp;ansible_connection=ssh ansible_user=user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;debug output -vvv and error#########&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TASK [Gathering Facts] **********************************************************************************************************************************************************************************************&lt;BR /&gt;task path: /home/user/file.yml:1&lt;BR /&gt;&amp;lt;10.x.x.x&amp;gt; ESTABLISH SSH CONNECTION FOR USER: user&lt;BR /&gt;&amp;lt;10.x.x.x&amp;gt; SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="user"' -o ConnectTimeout=10 -o ControlPath=/home/user/.ansible/cp/7935e2xxx&amp;nbsp;10.x.x.x '/bin/sh -c '"'"'echo ~user &amp;amp;&amp;amp; sleep 0'"'"''&lt;BR /&gt;&amp;lt;10.x.x.x&amp;gt; (255, b'', b'This system is the property of xyz. Unauthorized use may result in penalties including, but not limited to, reprimand, dismissal, financial penalties, and legal action.\nuser@10.x.x.x: Permission denied (publickey,password,keyboard-interactive).\r\n')&lt;BR /&gt;fatal: [10.206.30.36]: UNREACHABLE! =&amp;gt; {&lt;BR /&gt;"changed": false,&lt;BR /&gt;"msg": "Failed to connect to the host via ssh: This system is the property of xyz. Unauthorized use may result in penalties including, but not limited to, reprimand, dismissal, financial penalties, and legal action.\nuser@10.x.x.x: Permission denied (publickey,password,keyboard-interactive).",&lt;BR /&gt;"unreachable": true&lt;/P&gt;</description>
    <pubDate>Fri, 22 May 2020 08:15:14 GMT</pubDate>
    <dc:creator>SanthoshRoopesh</dc:creator>
    <dc:date>2020-05-22T08:15:14Z</dc:date>
    <item>
      <title>Not able to execute command on FW using ansible due to SSH key auth error</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/not-able-to-execute-command-on-fw-using-ansible-due-to-ssh-key/m-p/329323#M2353</link>
      <description>&lt;P&gt;Advices are deeply appreciated, stuck in this issue for 2-3 days, please find below info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample script###############&lt;/P&gt;&lt;P&gt;- name: running show system info cmd&lt;BR /&gt;hosts: PA&lt;BR /&gt;vars_files:&lt;BR /&gt;- pass.yml&lt;BR /&gt;roles:&lt;BR /&gt;- role: PaloAltoNetworks.paloaltonetworks&lt;BR /&gt;tasks:&lt;BR /&gt;- name: tasks will run now&lt;BR /&gt;panos_op:&lt;BR /&gt;#ip_address: '{{ ip_address }}'&lt;BR /&gt;# username: '{{ username }}'&lt;BR /&gt;password: '{{ password }}'&lt;BR /&gt;cmd: 'show system info'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ansible.cfg output######################&lt;/P&gt;&lt;P&gt;inventory=./hosts&lt;BR /&gt;roles_path=./roles&lt;BR /&gt;interpreter_python=/home/user/venv/bin/python&lt;BR /&gt;#[ssh_connection]&lt;BR /&gt;#ssh_args = -o ControlMaster=no&lt;BR /&gt;#host_key_checking = False&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hosts file output########&lt;/P&gt;&lt;P&gt;[PA]&lt;/P&gt;&lt;P&gt;10.x.x.x&amp;nbsp; &amp;nbsp;ansible_connection=ssh ansible_user=user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;debug output -vvv and error#########&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TASK [Gathering Facts] **********************************************************************************************************************************************************************************************&lt;BR /&gt;task path: /home/user/file.yml:1&lt;BR /&gt;&amp;lt;10.x.x.x&amp;gt; ESTABLISH SSH CONNECTION FOR USER: user&lt;BR /&gt;&amp;lt;10.x.x.x&amp;gt; SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="user"' -o ConnectTimeout=10 -o ControlPath=/home/user/.ansible/cp/7935e2xxx&amp;nbsp;10.x.x.x '/bin/sh -c '"'"'echo ~user &amp;amp;&amp;amp; sleep 0'"'"''&lt;BR /&gt;&amp;lt;10.x.x.x&amp;gt; (255, b'', b'This system is the property of xyz. Unauthorized use may result in penalties including, but not limited to, reprimand, dismissal, financial penalties, and legal action.\nuser@10.x.x.x: Permission denied (publickey,password,keyboard-interactive).\r\n')&lt;BR /&gt;fatal: [10.206.30.36]: UNREACHABLE! =&amp;gt; {&lt;BR /&gt;"changed": false,&lt;BR /&gt;"msg": "Failed to connect to the host via ssh: This system is the property of xyz. Unauthorized use may result in penalties including, but not limited to, reprimand, dismissal, financial penalties, and legal action.\nuser@10.x.x.x: Permission denied (publickey,password,keyboard-interactive).",&lt;BR /&gt;"unreachable": true&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 08:15:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/not-able-to-execute-command-on-fw-using-ansible-due-to-ssh-key/m-p/329323#M2353</guid>
      <dc:creator>SanthoshRoopesh</dc:creator>
      <dc:date>2020-05-22T08:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to execute command on FW using ansible due to SSH key auth err</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/not-able-to-execute-command-on-fw-using-ansible-due-to-ssh-key/m-p/329533#M2356</link>
      <description>&lt;P&gt;I suspect your &lt;CODE&gt;connection&lt;/CODE&gt; is not set to "local" at the top of your playbook...?&amp;nbsp; Because panos_op doesn't connect using ssh.&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 04:30:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/not-able-to-execute-command-on-fw-using-ansible-due-to-ssh-key/m-p/329533#M2356</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2020-05-23T04:30:53Z</dc:date>
    </item>
  </channel>
</rss>

