Enable ssh via onion
This commit is contained in:
parent
f6f611a093
commit
93fd202696
|
@ -3521,6 +3521,27 @@ function install_tor {
|
||||||
apt-get -y 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 {
|
function install_editor {
|
||||||
if grep -Fxq "install_editor" $COMPLETION_FILE; then
|
if grep -Fxq "install_editor" $COMPLETION_FILE; then
|
||||||
return
|
return
|
||||||
|
@ -9860,6 +9881,7 @@ enable_backports
|
||||||
configure_dns
|
configure_dns
|
||||||
initial_setup
|
initial_setup
|
||||||
install_tor
|
install_tor
|
||||||
|
enable_ssh_via_onion
|
||||||
check_date
|
check_date
|
||||||
install_dynamicdns
|
install_dynamicdns
|
||||||
randomize_cron
|
randomize_cron
|
||||||
|
|
Loading…
Reference in New Issue