easyMultiple Select
200-901 Practice Question: A developer is writing a Python script to back up…
A developer is writing a Python script to back up Cisco router configurations via SSH. Which two libraries are appropriate for this task? (Choose two.)
⚠ Common exam trap
Cisco often tests the distinction between HTTP-focused libraries (requests, urllib) and SSH-focused libraries (paramiko, netmiko), trapping candidates who mistakenly think 'requests' can handle any network protocol or that Flask's 'networking' capabilities extend to SSH.
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
✓
netmiko
Option B (netmiko) is correct because it is a Python library built specifically for automating network devices over SSH, providing multi-vendor support and high-level methods like ConnectHandler and send_command to retrieve Cisco router configurations. Option D (paramiko) is correct because it is a low-level Python SSHv2 implementation that can open an SSH session to a Cisco router, invoke an interactive shell, and read the running configuration output. Option A (requests) is not appropriate because it is an HTTP client library for REST APIs, not SSH-based CLI sessions. Option C (urllib) is not appropriate because it handles HTTP/FTP URL retrieval, not SSH. Option E (flask) is not appropriate because it is a web framework for building HTTP applications, not for SSH device automation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
requests
Why it's wrong here
The requests library speaks HTTP and HTTPS, not SSH, so it cannot open a shell session or run show commands on a router. It is tempting because it is the standard Python client for REST APIs, and it would be correct for backing up configurations through a router's HTTP-based API instead.
- ✓
netmiko
Why this is correct
Netmiko abstracts SSH transport for network devices, handling prompt detection, enable mode and configuration retrieval. It suits backing up Cisco router configurations because it manages the interactive CLI session that raw SSH libraries leave to the developer.
- ✗
urllib
Why it's wrong here
urllib handles HTTP and FTP URLs; it implements no SSH transport, so it cannot authenticate to or execute commands on a Cisco device. It is tempting as Python's built-in URL-fetching module, and it would be correct for retrieving a configuration file over HTTP from a web server.
- ✓
paramiko
Why this is correct
Paramiko implements the SSH2 protocol natively in Python, providing `SSHClient` and `exec_command` to open a channel and run `show running-config` on the router. This satisfies the stem's SSH transport constraint without shelling out to an external client, letting the script capture configuration output directly.
- ✗
flask
Why it's wrong here
Flask is a web framework for building HTTP servers; it provides no SSH client transport for connecting to routers. It is tempting because it is a common Python library, but it would be the correct choice for exposing a REST endpoint that triggers a backup, not for performing the SSH session itself.
Go deeper
Related to this question
About these practice questions
This 200-901 question is part of Courseiva's 975-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.