Forrest logo
tool overview
On this page you find all important commands for the CLI tool mosh. If the command you are looking for is missing please ask our AI.

mosh

Mosh is a command-line tool that stands for Mobile Shell. It is designed as a remote terminal application that enhances the SSH experience. Mosh can be used in various Unix-like operating systems, including Linux, macOS, and BSD. It is particularly useful for situations where network connectivity is volatile or has high latency. Mosh utilizes UDP for communication, allowing it to work well with unstable network connections. One of its primary advantages is its ability to recover from network disconnects and transitions between WiFi and mobile data seamlessly. Mosh also provides better responsiveness compared to traditional SSH, making it suitable for tasks that require real-time interaction. It supports various features like roaming, predictive local echo, and line editing with instant feedback. Moreover, Mosh is highly secure, encrypting all traffic and using techniques like State Synchronization Protocol (SSP) to protect against attack scenarios. Overall, Mosh is a reliable and efficient tool for establishing remote terminal connections, especially in challenging network environments.

List of commands for mosh:

  • mosh:tldr:1e15c mosh: Connect to a remote server.
    $ mosh ${username}@${remote_host}
    try on your machine
    explain this command
  • mosh:tldr:2157a mosh: Select Mosh UDP port (useful when `{{remote_host}}` is behind a NAT).
    $ mosh -p ${124} ${username}@${remote_host}
    try on your machine
    explain this command
  • mosh:tldr:82afa mosh: Connect to a remote server using a specific port.
    $ mosh --ssh="ssh -p ${2222}" ${username}@${remote_host}
    try on your machine
    explain this command
  • mosh:tldr:8be6a mosh: Usage when `mosh-server` binary is outside standard path.
    $ mosh --server=${path-to-bin-}mosh-server ${remote_host}
    try on your machine
    explain this command
  • mosh:tldr:f638a mosh: Connect to a remote server with a specific identity (private key).
    $ mosh --ssh="ssh -i ${path-to-key_file}" ${username}@${remote_host}
    try on your machine
    explain this command
tool overview