🎓 BookMCQ
← Back to 26. Standard Client Server Protocols

📝 Local login vs remote login in telnet (14 MCQs)

Local Console Access and Network-Based Login

A local login uses a terminal or console directly attached to the computer, so keyboard input and display output are handled through local interfaces. A remote login sends terminal interaction across a network to another host. TELNET historically provided this remote access, while local login does not require a TELNET connection or TCP session. Its simple terminal model made remote access possible across systems with different interfaces.

Where the Terminal Session Is Processed

In local access, the operating system receives input from a local console device and displays output through that device. In remote TELNET access, a client communicates with a server process over TCP, and the remote host performs authentication and command execution. The user's physical location and the system executing commands are therefore different concepts.

TELNET Connection Setup for Remote Login

For TELNET remote login, the client resolves or is given a host address, establishes TCP to port 23, and negotiates terminal options. It then exchanges login input and command output with the remote server. A local console login instead begins at the host's own login interface without opening a network terminal session.

Comparing a Console Login with a TELNET Login

A student signs in at a workstation's own console and runs a local command interpreter; that is local login. The same student uses a TELNET client from another computer to reach a server and receives its command prompt; that is remote login, with commands executed by the server rather than the client computer.

Credentials, Transport and Host Boundaries

Both local and remote login may authenticate a user and provide access to an operating-system account. The difference is the access path: local device input versus network transport. TELNET uses TCP and exposes data in plaintext, whereas SSH provides an encrypted remote terminal session with host authentication and protected user authentication.

Misconceptions About Local and Remote Login

'Remote login means commands execute on the client' is incorrect because commands run on the remote host. 'Local login always needs an IP connection' is false because a local console can operate without network communication. 'TELNET is needed for every remote login' is wrong because SSH and other remote-access methods can provide that function.

Distinguishing Login Location and Protocol Use

Classify scenarios by identifying the host that executes commands and the path carrying terminal data. For TELNET, state that remote interaction uses TCP port 23 and is not encrypted. Compare the security and network requirements of local console access, TELNET remote login and SSH remote login without confusing user location with execution location.

Local and Remote Access Terms

  • Local login - Uses a terminal attached to the host.
  • Remote login - Accesses another host over a network.
  • Console - Provides local input and display.
  • TELNET - Provides text-based remote terminal access.
  • Remote host - Executes commands sent by the client.
  • SSH - Provides secure remote terminal access.
4
Easy
6
Medium
4
Hard

📝 All Local login vs remote login in telnet MCQs

Q1. Which side creates a new socket after the TCP connection is established?

A.Server ✅
B.Client
C.Both
D.Neither
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The TCP three‑way handshake is completed by both ends, but only the server subsequently calls accept() to allocate a new socket for data exchange. This server‑side socket is distinct from the listening socket and is responsible for handling the client’s traffic, making the server the correct answer.

Q2. If the client uses a single socket for both connection establishment and data exchange, what is the most direct effect on system resources?

A.Increases memory usage
B.Reduces number of file descriptors ✅
C.Requires additional threads
D.Prevents data encryption
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Using one socket eliminates the need for a second file descriptor, which conserves kernel resources such as file descriptor slots and associated buffers. The reduction is immediate and measurable, whereas the other options involve additional complexity not directly tied to the socket count.

Q3. Compare local logging and remote logging in terms of immediate availability of log entries.

A.Local logs are instantly available on the client machine ✅
B.Remote logs are instantly available on the client machine
C.Both are delayed equally
D.Neither provides immediate availability
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Local logging writes directly to a file or storage on the client host, so entries can be read as soon as the write completes. Remote logging must traverse the network and be processed by a server, introducing a measurable delay before the logs become visible.

Q4. Applying the principle of fault tolerance, when should an application combine local and remote logging?

A.Only when network bandwidth is unlimited
B.When logs must survive client crash ✅
C.When security is not a concern
D.When the server is on the same host
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Combining local and remote logging creates redundancy: if the client crashes or loses network connectivity, locally stored logs preserve information until the remote server becomes reachable again. This dual approach directly addresses fault‑tolerance requirements, unlike the other options.

Q5. Given that the server creates a socket after establishing the connection, what can be inferred if the client receives a 'connection reset' error during data transfer?

A.Server failed to create its socket ✅
B.Client closed its socket prematurely
C.Network firewall blocked traffic
D.DNS resolution failed
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A reset during data transfer often indicates that the peer (the server) abruptly closed its end of the connection, which commonly occurs when the server’s accept() call fails or its newly created socket is closed unexpectedly. The other choices would manifest earlier or produce different error codes.

Q6. Evaluate the security implications of remote logging over an unencrypted TCP socket versus using TLS.

A.No difference
B.Unencrypted TCP exposes log data to eavesdropping ✅
C.TLS adds latency but no security benefit
D.Unencrypted TCP is more secure because it avoids certificate management
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Log messages frequently contain sensitive operational details. Transmitting them over plain TCP allows any intermediate device to read the payload, creating a clear confidentiality risk. TLS encrypts the stream, mitigating eavesdropping at the cost of modest additional latency, making option B the accurate assessment.

Q7. How does the use of a remote logging server impact the scalability of a distributed application compared to pure local logging?

A.Remote logging reduces scalability because each client must maintain a persistent connection
B.Remote logging improves scalability by centralizing log processing ✅
C.Both methods have identical scalability
D.Local logging scales better due to lack of network overhead
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Centralizing log handling offloads processing from each client, allowing them to focus on core tasks while the server aggregates, indexes, and archives logs. This design reduces per‑instance overhead and simplifies management, thereby enhancing scalability relative to a model where every node writes to its own local storage.

Q8. If an application switches from using a single socket for both connection setup and data exchange to separate sockets, which performance metric is most likely to improve?

A.CPU usage
B.Connection latency
C.Throughput for large log bursts ✅
D.Memory consumption
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Separating the control socket from the data socket allows the data path to be optimized for bulk transmission, reducing contention and enabling larger TCP windows. This typically yields higher throughput when sending sizable batches of log entries, whereas CPU, latency, and memory effects are less pronounced.

Q9. Synthesize a logging strategy that ensures log integrity when the remote server becomes temporarily unavailable.

A.Drop logs until server returns
B.Store logs locally and forward later ✅
C.Encrypt logs and send anyway
D.Switch to syslog over UDP
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The safest approach is to buffer logs on the client while the remote endpoint is down, then forward them once connectivity is restored. This guarantees that no entries are lost and maintains order. Dropping logs or sending them insecurely would compromise integrity, and UDP provides no delivery assurance.

Q10. When the server terminates the socket after sending an acknowledgment, what is the most probable effect on any subsequent log entries generated by the client?

A.They are automatically resent
B.They are lost unless buffered locally ✅
C.They trigger a new connection automatically
D.They are logged in the server's backlog
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Once the server closes its socket, the client’s subsequent writes encounter a broken pipe error, meaning the data cannot be transmitted. Unless the client has a local buffer or retry mechanism, those log entries are discarded, making loss the most likely outcome.

Q11. What is the default port number for syslog over TCP used in many remote logging implementations?

A.514 ✅
B.1514
C.1024
D.8080
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The standard syslog service listens on UDP port 514, and the same number is commonly used for TCP‑based syslog implementations unless a custom configuration overrides it. Therefore, 514 is the default TCP port for syslog traffic in typical deployments.

Q12. Analyze the trade‑off between using a persistent TCP connection for remote logging versus establishing a new connection for each log batch, considering both network overhead and log ordering guarantees.

A.Persistent connections increase overhead but guarantee ordering
B.New connections reduce overhead and improve ordering
C.Persistent connections reduce overhead and preserve ordering ✅
D.New connections increase overhead and may reorder logs
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: A long‑lived TCP connection amortizes handshake costs, reduces per‑batch packet overhead, and naturally preserves the sequence of log entries as they travel the same stream. In contrast, repeatedly opening new connections adds handshake latency and can disrupt ordering if batches arrive out of sequence.

Q13. Explain how the lifecycle of the server‑side socket influences the reliability of remote log delivery in a high‑availability cluster.

A.Short‑lived sockets cause log duplication
B.Long‑lived sockets enable load balancing
C.Proper socket termination ensures logs are flushed before failover ✅
D.Socket lifecycle does not affect reliability
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: When a server gracefully shuts down its socket—flushing buffers and sending final acknowledgments—any in‑flight log records are safely persisted before the node hands over to a standby. This disciplined termination prevents loss and ensures that a failover event does not truncate the log stream, directly enhancing reliability.

Q14. If a client observes that its local log file contains entries that are absent on the remote server, which combination of events is most consistent with this observation?

A.Server socket creation failed and client never attempted reconnection ✅
B.Network latency caused delayed delivery but eventual sync
C.Remote server filtered out entries due to severity level
D.Client wrote logs after closing its socket
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When the server cannot allocate its post‑handshake socket, the client’s attempts to send logs fail, and because the client does not retry or re‑establish the connection, those entries remain only in the local buffer. The other scenarios would either eventually reconcile the logs or involve deliberate filtering, which does not match the described discrepancy.

🔗 Related Topics (MCQs)