Skip to content

Instantly share code, notes, and snippets.

@yayoimizuha
Last active June 5, 2021 15:05
Show Gist options
  • Save yayoimizuha/657b7824cd93f3d4f3597073b2d296dc to your computer and use it in GitHub Desktop.
Save yayoimizuha/657b7824cd93f3d4f3597073b2d296dc to your computer and use it in GitHub Desktop.
SERVER_USER="mizuha"
SERVER_ADDR="153.127.6.191"
SERVER_PORT="11022"
hash gh 2>&1 /dev/null
if [ $? = 0 ]; then
ssh ${SERVER_USER}@${SERVER_ADDR} -p ${SERVER_PORT} "echo \"$(gh gist view $1)\" >> /home/${SERVER_USER}/.ssh/colab_ssh_keys"
gh gist delete $1
for i in {10000..10020}; do
ssh -L ${i}:localhost:${i} ${SERVER_USER}@${SERVER_ADDR} -p ${SERVER_PORT} -vvv
done
else
echo "Please install official GitHub CLI client."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment