Mosh wasn’t built to play cat and mouse with attackers. It was built to end the game. Unlike traditional SSH, Mosh (Mobile Shell) encrypts every packet with robust cryptography, rotates keys in real time, and resists replay attacks even over unstable or roaming connections. When networks drop, Mosh keeps its state without exposing your session to hijacking. There is no TCP tunnel to poison, no lingering session for an attacker to intercept. The only way in is through the handshake—and that handshake is locked down.
Security on the Mosh platform comes from several deliberate design choices. Every connection is authenticated using modern public-key cryptography before a single byte of shell data moves. Datagram Transport Layer Security (DTLS) ensures encryption without inheriting TCP’s weaknesses. Because Mosh runs over UDP, it shrugs off packet loss, spoofed reset attacks, and latency spikes that would cripple SSH. And because it uses ephemeral keys, even if a session key were somehow exposed, it would expire almost immediately, rendering it useless to an intruder.
The platform never trusts the network. Session resumption doesn’t re-use keys. It never assumes that a client’s IP address proves identity. It does not forward TCP connections, does not run background daemons anyone can scan, and its server-side footprint is minimal—only the exact code needed to establish and maintain the user shell. This narrow attack surface is intentional.