Courseiva
easyMultiple ChoiceObjective-mapped

350-401 Practice Question: Uses the following Python script with Netmiko to…

A network engineer uses the following Python script with Netmiko to send a command to a Cisco IOS-XE device:

```python

from netmiko import ConnectHandler

device = { 'device_type': 'cisco_ios', 'ip': '10.1.1.1', 'username': 'admin', 'password': 'password', 'secret': 'enable_secret'

}

connection = ConnectHandler(**device) output = connection.send_command('show ip interface brief')

print(output)

connection.disconnect() ```

What is the purpose of the 'secret' parameter in the device dictionary?

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

It is used to enter enable mode after connecting to the device.

The 'secret' parameter is used to enter enable mode (privileged EXEC mode) on Cisco devices. Netmiko will automatically use this password to elevate privileges after connecting.

Answer analysis

Option-by-option breakdown

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

  • It is used for SSH key-based authentication.

    Why it's wrong here

    SSH key authentication is handled differently.

  • It is used to enter enable mode after connecting to the device.

    Why this is correct

    The 'secret' parameter provides the enable password to enter privileged EXEC mode.

  • It is used to encrypt the session.

    Why it's wrong here

    Encryption is handled by SSH.

  • It is used to set the SNMP community string.

    Why it's wrong here

    SNMP is separate.

About these practice questions

This 350-401 question is part of Courseiva's 1,175-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 350-401 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 350-401 exam.