---
title: "Kafka from the terminal: hosts, ssh and the KRaft controller"
description: "Play this one in a shell: ssh between brokers, watch ping answer from your own host during a split, and see that a Kafka controller holds no partition data."
url: https://monedula.dev/kafka-simulator/scenarios/terminal-hosts-and-ssh/
---

# Kafka from the terminal: hosts, ssh and the KRaft controller

Scenario 13.1.1 · Where am I: hosts, prompt, ssh. Terminal ops · Intermediate · about 3 min · Apache Kafka 4.3.

The prompt is cluster state: ssh between brokers, meet a controller that holds no partition data, and watch ping answer from your own host rather than from the cluster.

Run it: https://monedula.dev/kafka-simulator/playground/?scenario=13.1.1

## What you start with

This scenario is played from the terminal (Ctrl and the backtick key). Every Kafka tool you run is a CLIENT running on a HOST, and which host you are on decides what you can reach. A network partition isolates broker-3 for a few seconds; ping and ssh answer that out of the host you are standing on, without asking the cluster anything.

## Step by step

1. **Three brokers, three racks, a KRaft quorum** (t+0.000s): Open the terminal with Ctrl and the backtick key (on a phone, the "..." menu). You start on broker-1. Run `hostname` and `cat config/server.properties` to see which machine you are on and how it is configured. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.1&t=0)
2. **A second machine** (t+1.500s): `ssh broker-2` moves you. Same cluster, different host: the prompt changes, and `cat config/server.properties` now reports node.id=2 and its own rack. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.1&t=1)
3. **broker-3 is cut off** (t+3.000s): A network partition isolated broker-3. `ping broker-3` answers from broker-2, not from the cluster - your own host reporting what it can reach from where it stands. `ssh broker-3` refuses for the same reason: you cannot log into a machine this host has no route to. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.1&t=2)
4. **Still partitioned** (t+5.000s): `kafka-topics --describe --under-replicated-partitions` asks the CLUSTER the same question, and shows what the split cost the ISR. Then `exit` to drop back to broker-1. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.1&t=3)
5. **Healed, and a look at a controller** (t+7.000s): The partition healed. `ssh c-1` logs into a controller voter: `ls` finds no partition directories there, because a controller's log dir holds only the cluster metadata log, which this terminal does not list. Read its config with `cat config/controller.properties`. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.1&t=4)

## The takeaway

The prompt is not decoration: it names the machine your commands run on. ssh moves you, exit comes back, and ping answers from THIS host - so the shell can tell you a machine is unreachable from here without asking a single broker, while kafka-topics asks the cluster and reports the ISR the split cost it. A controller is a machine too, but its log dir holds the metadata log, not partition data.

## Further reading

- [Apache Kafka documentation](https://kafka.apache.org/43/operations/kraft/)
