ssh via tor on Arch
This commit is contained in:
parent
e8a6d8fdd7
commit
c0983fbc4a
|
@ -109,7 +109,7 @@ function ssh_remove_small_moduli {
|
||||||
|
|
||||||
function configure_ssh_client {
|
function configure_ssh_client {
|
||||||
if [ -f /usr/bin/pacman ]; then
|
if [ -f /usr/bin/pacman ]; then
|
||||||
sudo pacman -S proxytunnel
|
sudo pacman --noconfirm -S openbsd-netcat
|
||||||
else
|
else
|
||||||
sudo apt-get -y install tor connect-proxy
|
sudo apt-get -y install tor connect-proxy
|
||||||
fi
|
fi
|
||||||
|
@ -162,10 +162,16 @@ function configure_ssh_client {
|
||||||
echo 'Host *.onion' > ~/.ssh/config
|
echo 'Host *.onion' > ~/.ssh/config
|
||||||
echo ' ServerAliveInterval 60' >> ~/.ssh/config
|
echo ' ServerAliveInterval 60' >> ~/.ssh/config
|
||||||
echo ' ServerAliveCountMax 3' >> ~/.ssh/config
|
echo ' ServerAliveCountMax 3' >> ~/.ssh/config
|
||||||
|
|
||||||
|
proxycmd="connect -R remote -5 -S 127.0.0.1:9050 %h %p"
|
||||||
|
if [ -f /usr/bin/pacman ]; then
|
||||||
|
proxycmd="/usr/bin/nc -X 5 -x 127.0.0.1:9050 %h %p"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $ENABLE_MONKEYSPHERE == $'yes' || $ENABLE_MONKEYSPHERE == $'y' ]]; then
|
if [[ $ENABLE_MONKEYSPHERE == $'yes' || $ENABLE_MONKEYSPHERE == $'y' ]]; then
|
||||||
echo " ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; connect -R remote -5 -S 127.0.0.1:9050 %h %p'" >> ~/.ssh/config
|
echo " ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; $proxycmd'" >> ~/.ssh/config
|
||||||
else
|
else
|
||||||
echo " ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p" >> ~/.ssh/config
|
echo " ProxyCommand $proxycmd" >> ~/.ssh/config
|
||||||
fi
|
fi
|
||||||
echo 'Host *' >> ~/.ssh/config
|
echo 'Host *' >> ~/.ssh/config
|
||||||
echo ' ServerAliveInterval 60' >> ~/.ssh/config
|
echo ' ServerAliveInterval 60' >> ~/.ssh/config
|
||||||
|
|
Loading…
Reference in New Issue