Mosh Scroll
To enable mosh scroll in a remote shell, run a terminal multiplexer on your host. You can also adjust your local terminal app settings to capture screen history. Teams often use Mosh to keep remote shells alive across weak networks. When engineers log in, they notice the mouse wheel does not scroll up. Standard SSH sends every line of output to your local terminal buffer. Mosh works in a different way to save network bandwidth. To fix this, admins often grant broad shell roles so users can inst
Scroll: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
To enable mosh scroll in a remote shell, run a terminal multiplexer on your host. You can also adjust your local terminal app settings to capture screen history.
Teams often use Mosh to keep remote shells alive across weak networks. When engineers log in, they notice the mouse wheel does not scroll up. Standard SSH sends every line of output to your local terminal buffer. Mosh works in a different way to save network bandwidth. To fix this, admins often grant broad shell roles so users can install tools. Overly broad server permissions let any user read sensitive files or change system settings.
How mosh scroll works under the hood
Mosh does not send a continuous stream of text to your computer. Instead, it syncs only the current visible screen state over UDP. Your local client and the remote server both keep a copy of the screen. When output changes, the server sends only the newest frame to your screen. Lines that move past the top of the window do not stay in local memory.
Because of this design, native mosh scroll is very limited by default. Your local terminal app sees Mosh as a full-screen program. It switches into an alternate screen mode that turns off normal scrollbars. To read past output, you must keep history on the remote server itself. Most engineers start a multiplexer session right after they log in. The multiplexer holds the text buffer in server memory and lets you page up.
Using terminal multiplexers to read past output
A remote multiplexer sits between the Mosh server process and your shell prompt. It captures every line that your commands print out during the session. When you need to check an old error, you enter copy mode. Copy mode freezes the live view and lets you move up with keys. You can also turn on mouse support inside the multiplexer settings. Then your trackpad or mouse wheel works just like a normal window.
Some local terminal apps offer a toggle for alternate screen scrolling. This setting turns mouse wheel movements into up and down arrow keys. It helps you move through history inside tools that capture the screen. Still, it still will not bring back text that Mosh skipped during a fast print. A server-side buffer remains the only reliable way to keep every single line.
Scroll: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native shell setups solve and leave open
Setting up Mosh with a multiplexer solves dropped sessions and missing scroll history. Engineers can roam between Wi-Fi networks and still read full command output. Native SSH keys and system roles decide which users can log in to the host. Once the shell opens, those initial checks are finished for the whole session.
This native setup leaves a major operational gap during active work. System login rules do not inspect individual commands while they run in flight. An engineer with shell permissions can run destructive scripts or read raw customer tables. Also, keeping detached multiplexer buffers on servers leaves sensitive data sitting in memory. If a command prints emails, phone numbers, or card numbers, that text stays on the host. Teams lack a central audit trail of what commands ran inside those persistent buffers.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Why does my mouse wheel cycle through old commands instead of scrolling?
Your terminal is in alternate screen mode, which maps wheel events to arrow keys. The shell receives up arrows and cycles through your past command history instead of output.
Does Mosh drop output lines when a command prints very fast?
Yes, Mosh syncs only the current visible frame to save bandwidth on slow links. Text that scrolls past between screen updates is not sent to your local client.
Can I search through past terminal output inside a Mosh session?
You cannot search far back using your local terminal find tool alone. Run a multiplexer on the remote host so it stores and searches the full buffer.
Related guides
In this post