Command Auditing in an SSH Terminal: What the Client Can See, and What Only the Server Can Enforce
Originally published on MistLab . Part 6 of Building an SSH Terminal . Part 6 of "Building an SSH Terminal". Code excerpts are from MistTerm v1.2.26, an open-source (AGPL) SSH terminal client by MistLab and from the server-side agent installer in the Mist server repository; they are trimmed, and comments are translated from Chinese. TL;DR A terminal sees keystrokes, not the command the shell…
Command auditing in an SSH terminal is a concept that involves evaluating user inputs before they are executed on a server. This process primarily occurs on the server side, where processes initiate, rather than on the client side, where the terminal resides. The client-side sees keystrokes but does not perceive the final command executed by the shell. Client-side command checks serve as advisories and cannot enforce restrictions, while server-side enforcement is necessary to truly control executed commands.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.