← Back to Reading
ByteByteGo 2026-10-03

EP228: How SSH Works

Secure Shell (SSH) provides secure access to a remote machine across an unsecured network starting with a TCP connection. The client and server negotiate cryptographic algorithms and independently compute matching session keys that are never transmitted over the wire. Host verification occurs when the client checks the server's public key against the known_hosts file. Authentication finishes when the server verifies a digital signature generated by the client's private key against the authorized_keys file. Serving large language models at scale is computationally expensive, requiring targeted techniques to optimize efficiency and reduce latency. Six prominent methods include streaming, quantization, continuous batching, prefix caching, paged KV cache, and speculative decoding. Adopting these techniques decreases memory footprint, reduces GPU idle time, and improves both actual and user-perceived response times. An AI agent fundamentally functions as an iterative while-loop governed by an underlying LLM that makes decisions, executes actions, and evaluates results until a task is completed. Key architectural components include the LLM as the decision-making brain, planning strategies to decompose complex goals, and tool integrations to interact with the environment. Additionally, agents rely on partitioned short-term and long-term memory systems to maintain context over time. System guardrails such as sandboxing and token limits are vital to regulate autonomous execution and prevent failure.

Read the original ↗
Contents 5 sections
  1. 01How SSH Works
  2. 02Top 6 Techniques to Make Your AI System Efficient
  3. 03The Anatomy of an AI Agent
  4. 04How do you know if your AI app actually works?
  5. 05🚀 New Course: AI Evals in Practice Starts on Oct. 7

How SSH Works

Secure Shell (SSH) provides secure access to a remote machine across an unsecured network starting with a TCP connection. The client and server negotiate cryptographic algorithms and independently compute matching session keys that are never transmitted over the wire. Host verification occurs when the client checks the server's public key against the known_hosts file. Authentication finishes when the server verifies a digital signature generated by the client's private key against the authorized_keys file.

  • SSH begins by establishing a TCP connection between the SSH client and the SSH server.
  • Both machines negotiate cryptographic algorithms and run a key exchange protocol to independently derive session keys.
  • Session keys are never transmitted over the network wire.
  • The SSH server's public host key is verified against the client's known_hosts file.
  • Client authentication utilizes public-key cryptography verified against the server's authorized_keys file while the private key never leaves the client machine.

Top 6 Techniques to Make Your AI System Efficient

Serving large language models at scale is computationally expensive, requiring targeted techniques to optimize efficiency and reduce latency. Six prominent methods include streaming, quantization, continuous batching, prefix caching, paged KV cache, and speculative decoding. Adopting these techniques decreases memory footprint, reduces GPU idle time, and improves both actual and user-perceived response times.

  • Streaming sends tokens immediately upon generation, reducing perceived latency to time-to-first-token.
  • Quantization converts model weights to lower-precision formats like FP8 to reduce memory consumption and hosting costs.
  • Continuous batching dynamically fills open slots with incoming requests, minimizing GPU idle time.
  • Prefix caching avoids redundant computation by reusing cached calculations for recognized prompt prefixes.
  • Paged KV cache allocates memory dynamically in fixed-size blocks rather than reserving contiguous chunks upfront.
  • Speculative decoding uses a smaller speculator model to propose tokens that the primary model verifies in a single pass.

The Anatomy of an AI Agent

An AI agent fundamentally functions as an iterative while-loop governed by an underlying LLM that makes decisions, executes actions, and evaluates results until a task is completed. Key architectural components include the LLM as the decision-making brain, planning strategies to decompose complex goals, and tool integrations to interact with the environment. Additionally, agents rely on partitioned short-term and long-term memory systems to maintain context over time. System guardrails such as sandboxing and token limits are vital to regulate autonomous execution and prevent failure.

  • An AI agent operates as an iterative while-loop driven by an LLM deciding actions rather than merely generating text.
  • Planning mechanisms such as Chain of Thought, Tree of Thoughts, and Reflexion decompose complex goals into discrete actions.
  • Tools extend agent capabilities through external functions like APIs, web search, code execution, and browsers, often standardized via MCP.
  • Agent memory is divided into short-term context windows and long-term storage including vector stores, files, and knowledge bases.
  • Guardrails such as human checks, sandboxing, and token limits are necessary to contain autonomous behavior.

How do you know if your AI app actually works?

Evaluating AI applications effectively follows a defined three-step recipe rather than an ambiguous process. First, teams select a specific task or capability to evaluate, such as safety, math, grounding, or retrieval. Second, they collect evaluation data pairing inputs with expected answers or behaviors. Third, developers build a grading system combining code-based graders for deterministic checks, model-based graders for scale, and human graders for nuanced edge cases.

  • A robust AI evaluation framework consists of three steps: selecting a task, collecting evaluation data, and developing a grader.
  • Evaluation datasets must pair input prompts with ground truth answers or expected behaviors, such as pairing unsafe prompts with refusals.
  • Code-based graders, such as unit tests, are best suited for cheap checks on outputs with clear correct answers.
  • Model-based graders (LLM-as-judge) handle subjective dimensions such as safety at scale.
  • Human graders are reserved for edge cases and high-nuance scenarios where throughput is secondary.
  • Production AI evaluation pipelines typically combine code-based, model-based, and human graders.

🚀 New Course: AI Evals in Practice Starts on Oct. 7

ByteByteGo and Manjeet Singh, Senior Director at Salesforce, have launched a live course titled 'AI Evals in Practice' starting on October 7. The curriculum focuses on designing and implementing evaluation systems for AI agents in production settings. Key topics include LLM-as-a-Judge systems, agent red-teaming, CI/CD integration, and evaluating multi-agent interactions.

  • ByteByteGo partnered with Manjeet Singh of Salesforce to offer the 'AI Evals in Practice' course starting October 7.
  • The course addresses evaluating AI agents across quality, safety, reliability, cost, and latency.
  • Key technical topics include designing LLM-as-a-Judge frameworks and red-teaming agents for jailbreaks and prompt injections.
  • Participants will learn to integrate evaluation pipelines into CI/CD workflows and production to catch drift and regressions.
  • The curriculum covers evaluation of RAG systems, tool use, multi-step execution, and multi-agent handoffs.