Courseiva
Question 539 of 989
Infrastructure and AutomationhardMultiple ChoiceObjective-mapped

200-901 Infrastructure and Automation Practice Question

A network automation engineer is developing a Python script that uses the NETCONF protocol to retrieve the running configuration from a Cisco IOS XE device. They use the ncclient library. The script works on the test device but fails on a production device with an error: "ncclient.transport.errors.AuthenticationError: Authentication exception". The engineer verifies that the SSH credentials (username and password) are correct and that the production device is reachable via SSH on port 830. What is the most likely issue?

⚠ Common exam trap

Cisco often tests the distinction between SSH transport authentication failures and NETCONF protocol-level failures, leading candidates to incorrectly attribute the error to NETCONF not being enabled or a firewall issue rather than the SSH authentication method mismatch.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The production device requires SSH key-based authentication, but the script uses password.

The error 'AuthenticationException' from ncclient indicates that the NETCONF session over SSH failed during authentication. Since the engineer verified the password is correct and the device is reachable on port 830, the most likely cause is that the production device is configured to require SSH key-based authentication (e.g., using 'ip ssh server algorithm authentication publickey' or similar), while the script is attempting password-based authentication. ncclient defaults to password authentication unless explicitly configured with a key filename.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The production device uses a different port for NETCONF than the test device.

    Why it's wrong here

    If port were different, the connection would fail at the TCP level, not with an authentication error.

  • The production device has a firewall rule blocking NETCONF capabilities.

    Why it's wrong here

    Firewall blocking would cause connection timeouts or resets, not authentication errors.

  • The production device does not have NETCONF enabled; it only supports SSH.

    Why it's wrong here

    If NETCONF were disabled, ncclient would raise a different error (e.g., 'no NETCONF capability').

  • The production device requires SSH key-based authentication, but the script uses password.

    Why this is correct

    Many production devices require keys for NETCONF authentication; password may fail at the NETCONF layer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.