Created
February 3, 2023 10:09
-
-
Save mashcom/5612d9d67b0e5098082dda856a9edf2b to your computer and use it in GitHub Desktop.
Create SSH Tunnel
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 tunnel service everythingcli MySQL on local port 5000 | |
After=network.target | |
[Service] | |
Environment="AUTOSSH_GATETIME=0" | |
ExecStart=/usr/bin/autossh -p 64371 -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NL 5000:localhost:3306 root@target_server | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment