CAS-004 Security Engineering Practice Question
A security engineer is hardening an SSH server. The policy requires disabling all legacy algorithms and using only modern, secure cryptography. Which THREE of the following configurations should the engineer apply?
⚠ Common exam trap
CAS-005 often tests the temptation to allow legacy protocols or root password login 'for compatibility' — candidates must recognise that these options directly violate the hardening requirement and are never correct in a secure configuration context.
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
✓
Set HMAC algorithms to use only SHA-2 or stronger.
Option A is correct because configuring the MAC (HMAC) list to SHA-2 or stronger (e.g., hmac-sha2-256, hmac-sha2-512) removes weak legacy integrity algorithms such as hmac-md5 and hmac-sha1, which are vulnerable to collision and downgrade attacks. Option D is correct because disabling password authentication and permitting only public-key authentication eliminates brute-force and credential-replay risks, since SSH keys provide stronger, non-reusable cryptographic proof of identity. Option E is correct because restricting KEX algorithms to curve25519-sha256 uses modern elliptic-curve Diffie-Hellman with strong forward secrecy, excluding outdated groups like diffie-hellman-group1-sha1. Option B is wrong because SSH protocol version 1 is deprecated and insecure (vulnerable to MITM and CRC-32 attacks); only SSH-2 should be allowed. Option C is wrong because enabling direct root login with a password violates least-privilege and hardening best practices, exposing the most privileged account to brute-force attacks.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Set HMAC algorithms to use only SHA-2 or stronger.
Why this is correct
Restricting HMAC to SHA-2 or stronger removes MD5 and SHA-1 message authentication codes, which are collision-prone and deprecated. This directly satisfies the policy's requirement to disable legacy algorithms, since SSH MAC negotiation would otherwise still permit these weak integrity checks.
- ✗
Allow only SSH protocol version 1 for compatibility.
Why it's wrong here
SSHv1 is obsolete and insecure.
- ✗
Enable root login with password for administrative convenience.
Why it's wrong here
Root login with password is a security risk.
- ✓
Disable password authentication and allow only key-based authentication.
Why this is correct
Disabling password authentication and permitting only key-based authentication removes brute-force and credential-replay vectors, since the private key must be possessed. This satisfies the hardening policy's requirement to disable legacy authentication methods and reduce the SSH server's attack surface.
- ✓
Restrict key exchange algorithms to curve25519-sha256.
Why this is correct
Restricting key exchange to curve25519-sha256 removes legacy Diffie-Hellman groups such as diffie-hellman-group1-sha1, satisfying the policy's requirement to disable weak algorithms. Curve25519 provides modern elliptic-curve key agreement with forward secrecy, so this configuration directly hardens the SSH transport layer against downgrade and brute-force attacks.
Quick reference
Asymmetric Encryption Algorithm Comparison
| Algorithm | Key Exchange | Signatures | Equivalent Security Key | Notes |
|---|---|---|---|---|
| RSA-3072 | Yes | Yes | 128-bit | Widely deployed; slow for bulk data |
| ECDSA P-256 | No | Yes | 128-bit | Fast signatures; standard TLS certs |
| ECDH / ECDHE | Yes | No | 128-bit | Perfect forward secrecy in TLS 1.3 |
| DH / DHE | Yes | No | 128-bit (3072-bit key) | Replaced by ECDHE in modern TLS |
| Ed25519 | No | Yes | ~128-bit | SSH keys, modern PKI |
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 973-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This CAS-005 practice question is part of Courseiva's free CompTIA 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 CAS-005 exam.