By following these steps you should have password less access to your remote hosts and networks via ssh and sshuttle.
Replace user with the your [user]. Put the relevant sections with configuration specific to your use case.
sshuttle --sudoers
Success, sudoers file update.
ssh-copy-id [user]@some.remote.host.com
sshuttle -v -r [user]@some.remote.host.com 10.0.0.0/16 10.1.0.0/16 10.2.0.0/16
There should now be no password prompt to securely access this server and the subnets it routes
nvim /home/[user]/.config/systemd/user/sshuttle.service
Here is a unit template for
# /home/[user]/.config/systemd/user/sshuttle.service
[Unit]
Description=sshuttle service a permanent tunnel
After=network.target
[Service]
# https://gist.github.com/theherk/8b1bf162a2403cca40f3dfd968be7853
ExecStart=/usr/bin/sshuttle -r [user]@some.remote.host.com 10.0.0.0/16 10.1.0.0/16 10.2.0.0/16 --pidfile=/run/user/%U/sshuttle.pid
Restart=no
Type=simple
PIDFile=/run/user/%U/sshuttle.pid
By placing this unit in your users control you can start and stop it and it will have access to your ssh-agent keys
I have a vpn that I use to connect to the host which I have to run first.
systemctl --user daemon-reload
systemctl --user start sshuttle.service
To confirm every thing is working correctly
journalctl --user -u sshuttle.ct.service -f