[Unit] Description=ssh connection expose local port Wants=network-online.target After=network-online.target [Service] Type=forking User=<user> Group=<group> Nice=5 Restart=always TimeoutStopSec=90 ExecStart=tmux -L ssh-expose new-session -d "ssh -o GatewayPorts=true <remote_user>@<remote_addr> -p <remote_port> -R <remote_listen_ip>:<remote_port>:<local_address>:<local_address_toexpose>" [Install] WantedBy=multi-user.target