Last active
September 21, 2021 16:06
Revisions
-
lukechilds revised this gist
Sep 21, 2021 . 1 changed file with 2 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,7 @@ #!/usr/bin/env bash # # Setup or remove an SSH hidden service on Debian based systems. # # Usage: # # Setup SSH hidden service: -
lukechilds revised this gist
Sep 21, 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 @@ -7,6 +7,7 @@ # # Remove SSH hidden service: # $ curl -Ls https://git.io/tor-ssh | bash -s -- --remove-tor-ssh setup_ssh_hidden_service() { echo "Installing Tor..." echo "" -
lukechilds revised this gist
Sep 21, 2021 . 1 changed file with 8 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,12 @@ #!/usr/bin/env bash # # Usage: # # Setup SSH hidden service: # $ curl -Ls https://git.io/tor-ssh | bash -s -- --setup-tor-ssh # # Remove SSH hidden service: # $ curl -Ls https://git.io/tor-ssh | bash -s -- --remove-tor-ssh setup_ssh_hidden_service() { echo "Installing Tor..." echo "" -
lukechilds revised this gist
Sep 21, 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 @@ -35,6 +35,7 @@ if [[ "${arg}" == "--setup-tor-ssh" ]] then setup_ssh_hidden_service elif [[ "${arg}" == "--remove-tor-ssh" ]] then remove_ssh_hidden_service else echo "Invalid argument, pass in --setup-tor-ssh or --remove-tor-ssh" -
lukechilds created this gist
Sep 21, 2021 .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 @@ #!/usr/bin/env bash setup_ssh_hidden_service() { echo "Installing Tor..." echo "" sudo apt-get install -y tor echo "Adding SSH hidden service to torrc..." echo "" torrc_data=" SocksPort 0 HiddenServiceDir /var/lib/tor/umbrel-remote-ssh/ HiddenServicePort 22 127.0.0.1:22" echo "${torrc_data}" | sudo tee --append /etc/tor/torrc echo "Restarting Tor to load changes..." echo "" sudo systemctl restart tor sleep 5 echo "Getting Tor hidden service address..." echo "" sudo cat /var/lib/tor/umbrel-remote-ssh/hostname } remove_ssh_hidden_service() { echo "Removing Tor..." echo "" sudo apt-get purge -y tor } arg="${1}" if [[ "${arg}" == "--setup-tor-ssh" ]] then setup_ssh_hidden_service elif [[ "${arg}" == "--remove-tor-ssh" ]] remove_ssh_hidden_service else echo "Invalid argument, pass in --setup-tor-ssh or --remove-tor-ssh" fi