diff --git a/src/freedombone b/src/freedombone index d9dff3ca..95157d1d 100755 --- a/src/freedombone +++ b/src/freedombone @@ -3521,6 +3521,27 @@ function install_tor { apt-get -y install tor } +function enable_ssh_via_onion { + if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then + return + fi + apt-get -y install tor connect-proxy + if ! grep -q 'Host *.onion' /home/$MY_USERNAME/.ssh/config; then + if [ ! -f /home/$MY_USERNAME/.ssh ]; then + mkdir /home/$MY_USERNAME/.ssh + fi + echo 'Host *.onion' >> /home/$MY_USERNAME/.ssh/config + echo 'ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p' >> /home/$MY_USERNAME/.ssh/config + fi + if ! grep -q 'Host *.onion' /root/.ssh/config; then + if [ ! -f /root/.ssh ]; then + mkdir /root/.ssh + fi + echo 'Host *.onion' >> /root/.ssh/config + echo 'ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p' >> /root/.ssh/config + fi +} + function install_editor { if grep -Fxq "install_editor" $COMPLETION_FILE; then return @@ -9860,6 +9881,7 @@ enable_backports configure_dns initial_setup install_tor +enable_ssh_via_onion check_date install_dynamicdns randomize_cron