Score:0

How to ssh through the gitlab subdomain URL

ml flag
Sam

From this question I'd like to ask more of it

https://stackoverflow.com/questions/75527943/unable-to-git-clone-from-self-hosted-gitlab-instance-with-custom-port-6022

Solved the problem that I need to open the port on the cloud service. Now the next problem is how do I clone using the gitlab.gitlabinstance.com URL instead of the host machine IP. Example :

ssh [email protected] -p 6022

x.x.x.x is the host machine IP and it works.

I'd like to ssh through

ssh [email protected] -p 6022

and I got this output where the IP addresses are different than the host machine IP (z.z.z.z, y.y.y.y, a,a,a,a)

where the z.z.z.z, y.y.y.y, a.a.a.a are the public addresses

 ssh -vT gitlab.example.com -p6022
OpenSSH_8.5p1, OpenSSL 1.1.1k  25 Mar 2021
debug1: Reading configuration data /c/Users/Sam/.ssh/config
debug1: /c/Users/Sam/.ssh/config line 1: Applying options for gitlab.example.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to gitlab.example.com [z.z.z.z] port 6022.
debug1: connect to address z.z.z.z port 6022: Connection timed out
debug1: Connecting to gitlab.example.com [y.y.y.y] port 6022.
debug1: connect to address y.y.y.y port 6022: Connection timed out
debug1: Connecting to gitlab.example.com [a:a:a:a] port 6022.
debug1: connect to address a:a:a:aport 6022: Network is unreachable
debug1: Connecting to gitlab.example.com [a:a:a:a] port 6022.
debug1: connect to address 2606:4700:3032::ac43:97fa port 6022: Network is unreachable
ssh: connect to host gitlab.example.com port 6022: Network is unreachable

is there any solution for this?

vidarlo avatar
ar flag
Why does not `gitlab.example.com` point to 172.13.2.1?
Sam avatar
ml flag
Sam
i dont know @vidarlo when i try to ssh into `example.com` it shows the same IP address as y.y.y.y
vidarlo avatar
ar flag
Did you set up DNS?
Sam avatar
ml flag
Sam
no @vidarlo i didnt
vidarlo avatar
ar flag
Why do you expect `gitlab.example.com` to work if you've not configured DNS? I don't get head or tails of your question.
Sam avatar
ml flag
Sam
where can i set it up @vidarlo is it on the nginx?
Sam avatar
ml flag
Sam
i use alibaba cloud for the DNS setup @vidarlo
vidarlo avatar
ar flag
Can you give us the *real* domain and *real* IP addresses involved?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.