Last active
January 22, 2024 15:48
-
-
Save nfvs/22b81f8a2a796cce5a57abfad4da9bcb to your computer and use it in GitHub Desktop.
Use autossh to setup a local socks5 proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=AutoSSH socks5 tunnel | |
After=network-online.target ssh.service | |
[Service] | |
Environment="AUTOSSH_GATETIME=0" | |
ExecStart=/usr/bin/autossh -M 0 -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -D 0.0.0.0:1080 root@127.0.0.1 | |
ExecStop=/bin/kill $MAINPID | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment