Allow ssh to an onion address
This commit is contained in:
parent
3155260932
commit
ee1e13602e
|
@ -3465,6 +3465,7 @@ function initial_setup {
|
|||
apt-get -y install ca-certificates emacs24 cpulimit
|
||||
apt-get -y install cryptsetup libgfshare-bin obnam sshpass wget
|
||||
apt-get -y install avahi-daemon avahi-utils avahi-discover
|
||||
apt-get -y install connect-proxy
|
||||
|
||||
if [ ! -d $INSTALL_DIR ]; then
|
||||
mkdir -p $INSTALL_DIR
|
||||
|
@ -3473,6 +3474,20 @@ function initial_setup {
|
|||
echo 'initial_setup' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function allow_ssh_to_onion_address {
|
||||
if [ ! -d /home/$MY_USERNAME/.ssh ]; then
|
||||
mkdir /home/$MY_USERNAME/.ssh
|
||||
fi
|
||||
if [ ! -d /etc/tor ]; then
|
||||
echo $'Tor not found when updating ssh'
|
||||
exit 528257
|
||||
fi
|
||||
if ! grep -q "onion" /home/$MY_USERNAME/.ssh/config; then
|
||||
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
|
||||
}
|
||||
|
||||
function install_tor {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
|
@ -9795,6 +9810,7 @@ configure_internet_protocol
|
|||
create_git_project
|
||||
configure_ssh
|
||||
configure_ssh_onion
|
||||
allow_ssh_to_onion_address
|
||||
remove_instructions_from_motd
|
||||
check_hwrng
|
||||
search_for_attached_usb_drive
|
||||
|
|
Loading…
Reference in New Issue