From db766044deb11523ae75401e0185be66af045dd0 Mon Sep 17 00:00:00 2001 From: Vivek Krishnakumar Date: Wed, 24 May 2017 02:33:32 -0400 Subject: [PATCH] mosh: add page (#1384) --- pages/common/mosh.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/mosh.md diff --git a/pages/common/mosh.md b/pages/common/mosh.md new file mode 100644 index 0000000000..a40453a189 --- /dev/null +++ b/pages/common/mosh.md @@ -0,0 +1,28 @@ +# mosh + +> Mobile Shell (`mosh`) is a robust and responsive replacement for SSH. +> `mosh` persists connections to remote servers while roaming between networks. + +- Connect to a remote server: + +`mosh {{username}}@{{remote_host}}` + +- Connect to a remote server with a specific identity (private key): + +`mosh --ssh="ssh -i {{/path/to/key_file}}" {{username}}@{{remote_host}}` + +- Connect to a remote server using a specific port: + +`mosh --ssh="ssh -p {{2222}}" {{username}}@{{remote_host}}` + +- Run a command on a remote server: + +`mosh {{remote_host}} -- {{command -with -flags}}` + +- Select Mosh UDP port (useful when `{{remote_host}}` is behind a NAT): + +`mosh -p {{124}} {{username}}@{{remote_host}}` + +- Usage when `mosh-server` binary is outside standard path: + +`mosh --server={{/path/to/bin/}}mosh-server {{remote_host}}`