How to keep the connection persistent? For example, if the vps gets rebooted, etc.
Run it via systemd, create and enable a unit file and it will automate a restart on failure or on boot
[Unit] Description=Establish SSH Reverse Tunnel to VPS After=network.target [Service] ExecStart=/usr/bin/ssh -N -R 8080:localhost:8080 root@vps Restart=always RestartSec=30 User=justin StandardOutput=syslog StandardError=syslog SyslogIdentifier=vpstun [Install] WantedBy=multi-user.target
reply