-
-
Save andromedarabbit/4aa58f257d05014f5cf543ebfa7188db to your computer and use it in GitHub Desktop.
Revisions
-
andromedarabbit revised this gist
Feb 9, 2021 . 1 changed file with 1 addition and 1 deletion.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 @@ -4,7 +4,7 @@ if (! which sshd) ; then sudo apt-get update -y sudo apt-get install -y openssh-server sudo mkdir /run/sshd sudo /usr/sbin/sshd -d & fi if [[ -z "$NGROK_TOKEN" ]]; then -
andromedarabbit revised this gist
Feb 9, 2021 . 1 changed file with 1 addition and 0 deletions.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 @@ -1,6 +1,7 @@ #!/bin/bash -ex if (! which sshd) ; then sudo apt-get update -y sudo apt-get install -y openssh-server sudo mkdir /run/sshd sudo /usr/sbin/sshd -D -
andromedarabbit revised this gist
Feb 9, 2021 . 1 changed file with 1 addition and 1 deletion.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 @@ -3,7 +3,7 @@ if (! which sshd) ; then sudo apt-get install -y openssh-server sudo mkdir /run/sshd sudo /usr/sbin/sshd -D fi if [[ -z "$NGROK_TOKEN" ]]; then -
andromedarabbit revised this gist
Feb 9, 2021 . 1 changed file with 1 addition and 1 deletion.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 @@ -1,6 +1,6 @@ #!/bin/bash -ex if (! which sshd) ; then sudo apt-get install -y openssh-server sudo mkdir /run/sshd /usr/sbin/sshd -D -
andromedarabbit revised this gist
Feb 9, 2021 . 1 changed file with 5 additions and 0 deletions.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 @@ -1,5 +1,10 @@ #!/bin/bash -ex if which sshd ; then sudo apt-get install -y openssh-server sudo mkdir /run/sshd /usr/sbin/sshd -D fi if [[ -z "$NGROK_TOKEN" ]]; then echo "Please set 'NGROK_TOKEN'" -
andromedarabbit revised this gist
Feb 9, 2021 . 1 changed file with 1 addition and 1 deletion.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 @@ -14,7 +14,7 @@ fi echo "### Install ngrok ###" wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip unzip ngrok-stable-linux-amd64.zip chmod +x ./ngrok echo "### Update user: $USER password ###" -
andromedarabbit revised this gist
Feb 9, 2021 . 1 changed file with 2 additions and 2 deletions.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 @@ -1,4 +1,4 @@ #!/bin/bash -ex if [[ -z "$NGROK_TOKEN" ]]; then @@ -13,7 +13,7 @@ fi echo "### Install ngrok ###" wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip unzip ngrok-stable-linux-386.zip chmod +x ./ngrok -
retyui created this gist
Jun 5, 2020 .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,41 @@ #!/bin/bash if [[ -z "$NGROK_TOKEN" ]]; then echo "Please set 'NGROK_TOKEN'" exit 2 fi if [[ -z "$USER_PASS" ]]; then echo "Please set 'USER_PASS' for user: $USER" exit 3 fi echo "### Install ngrok ###" wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip unzip ngrok-stable-linux-386.zip chmod +x ./ngrok echo "### Update user: $USER password ###" echo -e "$USER_PASS\n$USER_PASS" | sudo passwd "$USER" echo "### Start ngrok proxy for 22 port ###" rm -f .ngrok.log ./ngrok authtoken "$NGROK_TOKEN" ./ngrok tcp 22 --log ".ngrok.log" & sleep 10 HAS_ERRORS=$(grep "command failed" < .ngrok.log) if [[ -z "$HAS_ERRORS" ]]; then echo "" echo "==========================================" echo "To connect: $(grep -o -E "tcp://(.+)" < .ngrok.log | sed "s/tcp:\/\//ssh $USER@/" | sed "s/:/ -p /")" echo "==========================================" else echo "$HAS_ERRORS" exit 4 fi