Last active
February 13, 2021 23:26
Revisions
-
Fusion revised this gist
May 10, 2019 . 2 changed files with 6 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 +1,5 @@ To run in a given container: ``` export C={container name} && curl https://gist.githubusercontent.com/Fusion/a81a6b5c90e40846e2f9f5ab03d41bc0/raw/sshon | bash ``` 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 @@ -7,4 +7,4 @@ echo "Attempting to run dropbear"; docker exec -t $C dropbear -p $PORT; sleep 1 done [ $? -ne 0 ] && { exit 1; } docker run -d --rm --name ssher-${PORT} -p ${PORT}:${PORT} svendowideit/ambassador ${IP} ${PORT} \ && echo "To terminate this SSH environment: export C={containername} && curl https://gist.githubusercontent.com/Fusion/a81a6b5c90e40846e2f9f5ab03d41bc0/raw/sshoff | bash"; -
Fusion revised this gist
May 10, 2019 . No changes.There are no files selected for viewing
-
Fusion revised this gist
May 10, 2019 . 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 @@ -7,4 +7,4 @@ echo "Attempting to run dropbear"; docker exec -t $C dropbear -p $PORT; sleep 1 done [ $? -ne 0 ] && { exit 1; } docker run -d --rm --name ssher-${PORT} -p ${PORT}:${PORT} svendowideit/ambassador ${IP} ${PORT} \ && echo "To terminate this SSH environment: export C={containername} && curl https://gist.githubusercontent.com/Fusion/a81a6b5c90e40846e2f9f5ab03d41bc0/raw/e43fa3fec5399a896958b6484aa04385db804679/sshoff"; -
Fusion revised this gist
May 10, 2019 . 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,5 +1,5 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid | tr -cd '[:print:]')" docker exec -t $C kill $PID docker stop ssher-${PORT} -
Fusion revised this gist
May 10, 2019 . 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,5 +1,5 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid | tr -cd '[:print:]')" && docker exec -t $C kill $PID docker stop ssher-${PORT} -
Fusion revised this gist
May 10, 2019 . 1 changed file with 2 additions and 6 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,9 +1,5 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid | tr -cd '[:print:]')" && docker exec -t $C kill $PID \ && docker stop ssher-${PORT} -
Fusion revised this gist
May 10, 2019 . 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 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid | tr -cd '[:print:]')" echo echo yes echo -
Fusion revised this gist
May 10, 2019 . 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 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid | tr -cd "[:print:])" echo echo yes echo -
Fusion revised this gist
May 10, 2019 . 1 changed file with 2 additions 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 @@ -5,4 +5,5 @@ echo echo yes echo echo "[$PID] [$PORT]" echo "PORT is [$PORT]" echo "PID is [$PID]" -
Fusion revised this gist
May 10, 2019 . 1 changed file with 2 additions 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,4 +4,5 @@ PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ echo echo yes echo echo "[$PID] [$PORT]" echo "PID is $PID" -
Fusion revised this gist
May 10, 2019 . 1 changed file with 5 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,7 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid)" echo echo yes echo echo "[$PID] [$PORT]" -
Fusion revised this gist
May 10, 2019 . 1 changed file with 0 additions 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,5 +1,4 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid)" \ && echo "[$PID] [$PORT]" -
Fusion revised this gist
May 10, 2019 . 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 @@ -2,4 +2,4 @@ PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid)" \ && docker stop ssher-${PORT} \ && echo "[$PID] [$PORT]" -
Fusion revised this gist
May 10, 2019 . 1 changed file with 2 additions and 3 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,5 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid)" \ && docker stop ssher-${PORT} \ && echo $PID $PORT -
Fusion revised this gist
May 10, 2019 . 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 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid)" \ && echo docker exec -t $C kill $PID \ && docker exec -t $C kill $PID \ && docker stop ssher-${PORT} -
Fusion revised this gist
May 10, 2019 . 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,5 +1,6 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid)" \ && echo $PID \ && docker exec -t $C kill $PID \ && docker stop ssher-${PORT} -
Fusion revised this gist
May 10, 2019 . 1 changed file with 2 additions 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,4 +1,5 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && PID="$(docker exec -t $C cat /var/run/dropbear.pid)" \ && docker exec -t $C kill $PID \ && docker stop ssher-${PORT} -
Fusion revised this gist
May 10, 2019 . 1 changed file with 4 additions 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 +1,4 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } PORT="$(docker exec -t $C ps x | grep dropbear | grep -Po '(222[0-9]{2})')" \ && docker exec -t $C kill $(cat /var/run/dropbear.pid) \ && docker stop ssher-${PORT} -
Fusion revised this gist
May 10, 2019 . 1 changed file with 7 additions and 5 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,8 +1,10 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } P1=$(netstat -plnt 2>/dev/null | grep -Po '(222[0-9]{2})' | sort | tail -1) && P2=${P1:-22199} && PORT=$((P2 + 1)) \ && IP=$((docker exec -t $C ip addr) | grep -Po '(172\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})') [ $? -ne 0 ] && { exit 1; } while [ "$(docker exec -t $C ps aux | grep dropbear)" == "" ]; do echo "Attempting to run dropbear"; docker exec -t $C dropbear -p $PORT; sleep 1 done [ $? -ne 0 ] && { exit 1; } docker run -d --rm --name ssher-${PORT} -p ${PORT}:${PORT} svendowideit/ambassador ${IP} ${PORT} \ && echo "To terminate this SSH environment: export C={containername} && curl ..."; -
Fusion revised this gist
May 10, 2019 . 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 @@ -2,7 +2,7 @@ P1=$(netstat -plnt 2>/dev/null | grep -Po '(222[0-9]{2})' | sort | tail -1) && P2=${P1:-22199} && PORT=$((P2 + 1)) \ && IP=$((docker exec -t $C ip addr) | grep -Po '(172\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})') \ && while [ "$(docker exec -t $C ps aux | grep dropbear)" == "" ]; do echo "Attempting to run dropbear"; docker exec -t $C dropbear -p $PORT; sleep 1 \ done \ && docker run -d --rm --name ssher-${PORT} -p ${PORT}:${PORT} svendowideit/ambassador ${IP} ${PORT} \ && echo "To terminate this SSH environment: export C={containername} && curl ..."; -
Fusion revised this gist
May 10, 2019 . 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,6 +3,6 @@ P1=$(netstat -plnt 2>/dev/null | grep -Po '(222[0-9]{2})' | sort | tail -1) && P && IP=$((docker exec -t $C ip addr) | grep -Po '(172\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})') \ && while [ "$(docker exec -t $C ps aux | grep dropbear)" == "" ]; do docker exec -t $C dropbear -p $PORT; sleep 1 \ done \ && docker run -d --rm --name ssher-${PORT} -p ${PORT}:${PORT} svendowideit/ambassador ${IP} ${PORT} \ && echo "To terminate this SSH environment: export C={containername} && curl ..."; -
Fusion revised this gist
May 10, 2019 . 1 changed file with 3 additions 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,8 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } P1=$(netstat -plnt 2>/dev/null | grep -Po '(222[0-9]{2})' | sort | tail -1) && P2=${P1:-22199} && PORT=$((P2 + 1)) \ && IP=$((docker exec -t $C ip addr) | grep -Po '(172\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})') \ && while [ "$(docker exec -t $C ps aux | grep dropbear)" == "" ]; do docker exec -t $C dropbear -p $PORT; sleep 1 \ done && && docker run -d --rm --name ssher-${PORT} -p ${PORT}:${PORT} svendowideit/ambassador ${IP} ${PORT} \ && echo "To terminate this SSH environment: export C={containername} && curl ..."; -
Fusion created this gist
May 10, 2019 .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 @@ . 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 @@ . 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,6 @@ [ "$C" == "" ] && { echo "Syntax: export C={containername} && curl ..."; exit 1; } P1=$(netstat -plnt 2>/dev/null | grep -Po '(222[0-9]{2})' | sort | tail -1) && P2=${P1:-22199} && PORT=$((P2 + 1)) \ && IP=$((docker exec -t $C ip addr) | grep -Po '(172\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})') \ && docker run -d --rm --name ssher-${PORT} -p ${PORT}:${PORT} svendowideit/ambassador ${IP} ${PORT} \ && docker exec -t $C dropbear -p $PORT \ && echo "To terminate this SSH environment: export C={containername} && curl ...";