📝 SSH protocol in computer networks (9 MCQs)
Secure Shell for Protected Remote Communication
Secure Shell (SSH) is an application protocol suite for secure remote login and other network services over an insecure network. It typically runs over TCP and provides server authentication, confidentiality and integrity. SSH protects interactive terminal sessions, file transfer and tunneled connections, replacing insecure remote-access methods such as traditional TELNET. Its layered design combines identity checks with protection for subsequent application traffic.
Authentication and Encryption in an SSH Session
SSH separates transport protection, user authentication and connection services. The transport protocol negotiates algorithms, performs key exchange and authenticates the server host. The user-authentication protocol verifies the client user, and the connection protocol multiplexes channels for shells, commands, forwarding or subsystems over the protected connection. Separating these responsibilities makes the session easier to reason about and implement.
Key Exchange, Host Verification and User Login
The client connects to the SSH server, exchanges protocol versions and negotiates cryptographic algorithms. Key exchange establishes shared session keys and verifies the server host key. The client then authenticates the user, for example with a password or public key, and requests a shell or another supported service. The ordering ensures that user services begin only after protected transport is established.
Opening an SSH Remote Shell
A technician runs ssh admin@192.0.2.15. The client opens TCP port 22, negotiates a secure transport session and checks the server's host key. The technician authenticates with an authorized public key, then requests an interactive shell. Keystrokes and terminal output travel inside the encrypted SSH channel. This sequence demonstrates both server verification and later authorization of the user.
SSH Services Beyond Interactive Login
SSH can support remote command execution, secure file transfer through SFTP, and port forwarding for carrying other application traffic. Public-key authentication uses a private key held by the client and a corresponding public key authorized by the server. Host-key verification helps the client detect a server identity change or interception attempt.
Misconceptions About SSH Security
'SSH encrypts only passwords' is false because the established session protects subsequent channel data as well. 'A server public host key is the user's login key' confuses host identity with user authentication keys. 'Using port 22 proves the server is genuine' is wrong because the client must verify the host key, not merely the port number.
Identifying SSH Port, Keys and Session Stages
Learn the typical TCP port 22, then separate server host authentication from client user authentication. Trace version exchange, algorithm negotiation, key exchange, user authentication and channel creation. Compare password and public-key authentication, and explain how SSH differs from TELNET in confidentiality, integrity and server identity checking. Trace each stage in order and identify which component provides each security property.
SSH Security and Session Terms
- SSH - Provides secure remote access and network services.
- Host key - Authenticates the server to the client.
- Key exchange - Establishes shared session keys.
- Public-key authentication - Verifies a user through key possession.
- Channel - Carries one logical SSH data stream.
- TCP port 22 - Receives standard SSH connections.
📝 All SSH protocol in computer networks MCQs
Q1. During the SSH handshake, which of the following sequences correctly explains the cause‑effect relationship that leads to the establishment of an encrypted channel?
📖 Explanation: Option B is correct because the SSH handshake begins with a key‑exchange algorithm where the client proposes a method, both sides compute a shared secret, and only after this is the session encrypted. The other options describe impossible or insecure orders, such as transmitting encrypted data before a key is established or exposing private keys.
Q2. What does the acronym SSH stand for?
📖 Explanation: SSH stands for Secure Shell. It is a protocol that provides a secure channel over an unsecured network, primarily used for remote login and command execution. The other options are fabricated and do not represent the actual meaning of the acronym.
Q3. How does SSH differ from Telnet in terms of authentication and data confidentiality, and which statement best captures this difference?
📖 Explanation: Option C correctly reflects that SSH secures the entire communication channel with both authentication (often via public‑key) and encryption, whereas Telnet transmits data in clear text and only optionally verifies identity. The other statements contain technical inaccuracies regarding transport protocols and encryption scopes.
Q4. If an administrator wants to enforce password‑less login using public‑key authentication, which principle of public‑key cryptography must be correctly applied to ensure security?
📖 Explanation: The correct principle is that the client proves it holds the private key matching a public key authorized on the server, typically via a signature challenge. This ensures password‑less authentication while keeping the private key secret. Storing passwords or transmitting private keys would compromise security, and SSH does not rely on symmetric keys for initial authentication.
Q5. A client receives a host key fingerprint that does not match the stored fingerprint for a server. Assuming the network is secure, what is the most plausible inference?
📖 Explanation: When the fingerprint differs, the most logical inference is that the server’s host key has changed, which could be legitimate (e.g., after regeneration) or indicate a man‑in‑the‑middle attack. The other options do not directly explain a fingerprint mismatch.
Q6. What is the likely impact on performance and security when SSH compression is disabled on a high‑latency link?
📖 Explanation: Disabling compression removes the extra processing overhead and prevents attacks that exploit compression side‑channels (e.g., CRIME). However, on high‑latency links the lack of compression can increase the amount of data transmitted, leading to higher bandwidth consumption and potentially longer transfer times.
Q7. Design a step‑by‑step procedure to replace password authentication with certificate‑based authentication in an enterprise SSH deployment, ensuring backward compatibility during the transition.
📖 Explanation: Option A outlines a secure migration: creating a Certificate Authority, issuing user certificates, configuring servers to trust the CA while retaining passwords, rolling out certificates, and finally retiring password authentication. This maintains service continuity and allows verification before decommissioning passwords. The other options either remove security, skip essential steps, or ignore user authentication entirely.
Q8. If a system administrator disables host key verification in SSH client configuration, which of the following vulnerabilities is most directly introduced?
📖 Explanation: Turning off host key verification removes the check that ensures the client is connecting to the intended server. This opens the connection to man‑in‑the‑middle attacks, where an attacker could present a forged host key and intercept or alter traffic. The other options describe unrelated effects.
Q9. Compare SSH tunneling with a site‑to‑site VPN for providing remote access to internal services. Which statement most accurately reflects their trade‑offs in scalability and security?
📖 Explanation: Option D correctly captures that SSH tunneling is straightforward for forwarding specific ports and delivers strong encryption for those streams, whereas a VPN creates a broader network tunnel, offering site‑wide access but incurring more configuration complexity and performance overhead. The other statements misrepresent encryption scopes or scalability characteristics.