We have gitlab runner on vm1, and sonarqube on vm2. To allow them to communicate, we bring up an SSH tunnel on vm1. We run the following commands to bring up the SSH tunnel between the gitlab runner docker container and Sonarqube.
docker exec -it <gitlabrunner1_containerid> /bin/bash
ssh -f -N -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -L localhost:5556:localhost:9000 sshtunnel@vm2
However, after a few hours the connection between the gitlab runner and sonarqube is lost. We also run the same SSH command on vm1 to connect it to vm2. However, that SSH tunnel is able to stay up fine. Can anyone provide insight on why the connection goes down?