I have a server installed in which I embed ssh and I run gitlab in the docker container on it and route the http and https traffic to it through nginx using a subdomain. This works fine, but I want to do something similar with ssh to use ssh + git. Currently ssh is on the host on 10022, but I do not want to open the second ssh port, I want me to be able to do this:
ssh example.com
git clone ssh://git@gitlab.example.com/me/project.git
I assume that what I want is some way to check the hostname used and redirect to the corresponding internal port in the same way that nginx does this for html trafficw, but I have no idea how to start. Is this possible, and if so, are there any guides that illustrate how to do this?
source
share