Skip to content

Instantly share code, notes, and snippets.

@phedders
Created December 9, 2012 22:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phedders/4247265 to your computer and use it in GitHub Desktop.
Save phedders/4247265 to your computer and use it in GitHub Desktop.
Very Simple shell mosh-{client,server} wrapper
h=1.2.3.4;
read a b port MOSH_KEY < <(ssh $h -t mosh-server 2>/dev/null|tr -d "\r"|grep MOSH); mosh-client $h $port
or
eval `ssh $h -t mosh-server 2>/dev/null|tr -d "\r"|awk '/^MOSH CONNECT/{print "MOSH_KEY=" $4,"mosh-client $h",$3}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment