Created
November 30, 2012 21:21
Revisions
-
ayust created this gist
Nov 30, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/bash set -e MOSH_IP="$(host -cIN "$1" | cut -d' ' -f4)" MOSH_CONNECT_INFO="$(ssh -t "$1" -- "mosh-server" | grep "MOSH CONNECT" | tr -d '\r' | cut -d' ' -f3,4)" read MOSH_PORT MOSH_KEY <<<"$MOSH_CONNECT_INFO" MOSH_KEY="$MOSH_KEY" exec mosh-client "$MOSH_IP" "$MOSH_PORT"