mosh
mosh - Robust Remote Shell (UDP)
The mosh module provides an enhanced wrapper for the Mobile Shell, ensuring availability by automatically downloading it via pixi if it is missing from the system. It is ideal for roaming and high-latency connections.
When to Activate
- When connecting to remote servers over unstable or high-latency networks (e.g., cellular data).
- When the user needs a connection that persists through network changes (roaming).
- When seeking an interactive SSH alternative with local echo and line editing features.
Core Principles & Rules
- UDP Requirement: Uses UDP ports (default 60000-61000) instead of TCP.
- SSH dependency: Requires a functioning SSH command to establish the initial handshake.
- Cross-Platform: Automatically handles setup via
pixion supported platforms (macOS/Linux).
Patterns & Examples
Basic Connection
# Connect to a remote server using Mosh
x mosh user@remote-host.com
Specific Port and SSH Command
# Use a custom SSH port and specific Mosh UDP port
x mosh -p 80 --ssh="ssh -p 2222" root@server.com
Checklist
- Ensure the remote server also has
mosh-serverinstalled. - Verify that UDP ports (60000-61000) are open on the remote firewall.
- Confirm the target user and hostname.
More from x-cmd/skill
x-cmd
|
25x-security
This skill provides comprehensive security assessment and vulnerability management tools through x-cmd CLI, including network reconnaissance with Shodan, vulnerability scanning with OSV, and known exploited vulnerability tracking with KEV. This skill should be used when users need to perform security assessments, vulnerability research, network reconnaissance, or security monitoring from command line interfaces.
13x-network
This skill provides comprehensive network administration and diagnostic tools through x-cmd CLI, including network scanning with Nmap, ARP table management, DNS configuration, routing table analysis, and enhanced ping utilities. This skill should be used when users need to perform network diagnostics, troubleshoot connectivity issues, analyze network topology, or monitor network performance from command line interfaces.
11x-knowledge
This skill provides access to various knowledge search tools through x-cmd CLI, including Hacker News, Wikipedia, DuckDuckGo search, RFC documents, Project Gutenberg books, and Stack Exchange. This skill should be used when users need to search for technical information, browse online knowledge bases, or access documentation from command line interfaces.
6x-git
This skill provides comprehensive Git and code hosting platform management tools through x-cmd CLI, including GitHub, GitLab, Codeberg, Forgejo integration, and Git hooks management. This skill should be used when users need to manage Git repositories, work with code hosting platforms, automate Git workflows, or configure Git hooks from command line interfaces.
6x-system
This skill provides comprehensive system administration and monitoring tools through x-cmd CLI, including process management, macOS system utilities, network configuration, disk health monitoring, and storage analysis. This skill should be used when users need to perform system administration tasks, monitor system performance, manage network configurations, or troubleshoot system issues from command line interfaces.
6