Skip to content

Instantly share code, notes, and snippets.

@grwlf
Created September 15, 2019 20:20
Show Gist options
  • Save grwlf/7a6a3fc2b18a661ec821454dc06f9ad3 to your computer and use it in GitHub Desktop.
Save grwlf/7a6a3fc2b18a661ec821454dc06f9ad3 to your computer and use it in GitHub Desktop.
mosh-nat-client.sh
#!/bin/sh
MOSH_SSH_NAME=$1
MOSH_RELAY=$2
PORT_A=34730
PORT_B=34731
MOSH_KEY=$(ssh "$MOSH_SSH_NAME" "mosh-nat-server.sh \"$MOSH_RELAY\" \"$PORT_A\"")
MOSH_KEY="$MOSH_KEY" mosh-client "$MOSH_RELAY" "$PORT_B"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment