SSH, mail and time services
Pick a protocol for the job
Not every service is a website. SSH provides secure remote sessions; SFTP performs file operations over an SSH transport. SMTP transfers and submits email, while IMAP lets a client access and manage a mailbox on a server. NTP synchronizes clocks. Choose a service by what the application must do, not by whether an IP address responds to ping. The following table gives common endpoint conventions, not a guarantee of listening services or a complete port registry.
Remote shell SSH TCP 22File operations SFTP TCP 22 (via SSH)Mail relay SMTP TCP 25Mail submission SMTP TCP 587 (STARTTLS) or 465 (implicit TLS)Mailbox access IMAP TCP 993 (implicit TLS)Clock sync NTP UDP 123 (server destination)SSH and file transfer trust
In an authorized SSH session, the client authenticates the server using its host key or other configured trust mechanism, then the server authenticates the user. SFTP is not FTP with TLS: it uses the SSH connection for file operations and needs appropriate server permissions. A reachable TCP port does not prove that the host key is correct or the user may log in. If the recorded host key changes unexpectedly, stop and verify the expected key with the administrator through a trusted channel. Do not discard trust checks or use real credentials in practice.
Mail submission, transfer and retrieval
A fictional mail client submits a message to its own provider using authenticated SMTP submission over TLS. Mail servers may relay that message to the recipient domain using SMTP, often selecting destinations using DNS MX records. The recipient reads the stored message through IMAP over TLS. On port 465 TLS starts immediately; submission on 587 can negotiate TLS using STARTTLS, and a secure client must require successful encryption and verification rather than silently proceeding in cleartext. IMAP access on 993 uses implicit TLS. Transport encryption protects particular hops, not necessarily every relay or the stored message. An SMTP acceptance is not proof that the recipient read the message.
Sender -> SMTP submission -> sender mail serverSender mail server -> SMTP relay -> recipient mail serverRecipient mail client -> IMAP -> stored mailboxTime synchronization and diagnosis
NTP compares timestamps to estimate network delay and clock offset. In a simple four-timestamp example t1 is client send, t2 server receive, t3 server send, t4 client receive. If they are 100, 130, 140 and 150 milliseconds on their respective clocks, estimated round-trip network delay is (150−100)−(140−130)=40 ms; estimated server-minus-client offset is ((130−100)+(140−150))/2=10 ms. The estimate assumes roughly symmetric path delays; real algorithms filter multiple samples. An incorrect clock can affect certificate validity checks and log correlation. NTP alone does not establish trust in a time source; use approved sources and authentication such as NTS where supported.
t1=100 ms; t2=130 ms; t3=140 ms; t4=150 msdelay=40 ms; offset=+10 ms (server minus client)Practice and next step
Choose the service for listing folders in a remote mailbox, securely transferring a report to an authorized SSH server, and synchronizing a clock. Answers: IMAP, SFTP and NTP. A successful ping establishes none of these service-specific capabilities. Next: access control lists and firewalls, where the protocol and direction of a flow affect policy decisions. References: RFC 4251, 5321, 9051, 8314, 5905 and OpenSSH sftp(1).
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
SSH, mail and time services — knowledge check
Apply concepts to fictional application protocol scenarios.
Which protocol retrieves and manages mailbox folders?
Which protocol fits authorized file operations over an SSH connection?
Which service convention uses TCP 465 with TLS from the start?
For t1=100, t2=130, t3=140, t4=150 ms, what is the estimated offset?
An SSH server host key unexpectedly changes. What is the safest next action?