Cyber Class 9 Python Programming

Asked by GIANSH GUPTA KHUNDKER · BIRLA BRAINIACS

When using the Paramiko library to automate SSH configurations or fetch secure logs across multiple remote servers, what is the safest way to handle host key verification?

Answer as guest — Start Free Practice Test to earn Practice PointsHow to earn pointsAsk a question+3Answer a question+1Someone answers yours+1Your Q gets upvoted+1Pioneer bonus (first 5)+51 point = ₹1 discount on purchases, ask questions & climb the leaderboard!
Show answer and explanation

Answer: B. Loading a trusted keys file via ssh.load_host_keys() and enforcing strict verification.

Answer: B) Loading a trusted keys file via ssh.load_host_keys() and enforcing strict verification.
Explanation: While AutoAddPolicy() is convenient for quick testing, it blindly accepts any unknown host key. In a production or hostile network environment, this leaves the script completely vulnerable to Man-in-the-Middle (MitM) attacks. Loading known, verified keys is the only way to validate server identities reliably.

Answering after opening this box earns no Practice Points.

70%