Why i can’t connect to Gitlab on a container via SSH?

Just about everything is virtual these days. Topics relating to virutalization go here.

Moderator: Lillian.W@AST

Post Reply
pfuturo
Posts: 1
youtube meble na wymiar Warszawa
Joined: Wed Dec 22, 2021 10:36 pm

Why i can’t connect to Gitlab on a container via SSH?

Post by pfuturo »

I have installed a local Gitlab in Portainer CE on Asustor.

I used putty to try to connect via SSH with the right port to Gitlab but it’s respond with “no supported authentication methods available (server sent publickey)”.

I try to create a new SSH key, and i put it on gitlab without success. On the Asustor the service of SSH is active in fact when i try to connect via SSH to the Asustor, it’s responde correctly. I used port 22 for SSH of Asustor and port 49165 for SSH of Gitlab. Anyone can help me? Thanks
ndl101
Posts: 57
Joined: Sun Jul 11, 2021 4:32 pm

Re: Why i can’t connect to Gitlab on a container via SSH?

Post by ndl101 »

Enabling SSH via ADM will not enable SSH inside the Gitlab container. You need to think of the containers running on your NAS as systems sort of separate from the NAS itself. If you want to access the Gitlab container via SSH, a SSH server must be running inside the GItlab container as well. In addition to that, you must via docker/portainer bind a port on the NAS pointing towards the port on the Gitlab container the Gitlab's SSH server is listening on. So, if your Gitlab container is listening on ports 80, 443, and 22 in the container, then on the NAS via docker/portainer, you need to map (NAS -> container) e.g. 44080 -> 80, 44443 -> 443 and 4402 -> 22. Alternatively, configure the Gitlab container to obtain its own LAN IP address (still having a SSH server running inside the container). If this makes no sense to you, I suggest you read up on how containers and docker networking works before going any further with this. If, on the other hand, all this makes perfect sense to you and I am making wrong assumptions about what you are doing, then, please, provide more information as what little you already have is not enough in order for anyone to provide proper, quailfied help.

I made it long as I lacked the time to make it short.

---
Help to self-help:
How to ask (good) questions in a forum
---
General information
Location: Denmark
OS: Ubuntu 20.04
NAS: Lockerstor 4 (AS6604T)
shadmaan
Posts: 1
Joined: Thu Mar 10, 2022 7:47 pm
Contact:

Re: Why i can’t connect to Gitlab on a container via SSH?

Post by shadmaan »

pfuturo wrote:I have installed a local Gitlab in Portainer CE on Asustor.

I used putty to try to connect via SSH with the right port to Gitlab but it’s respond with “no supported authentication methods available (server sent publickey)”.
midasbuy
pubg mobile
blue world city
blue world city
I try to create a new SSH key, and i put it on gitlab without success. On the Asustor the service of SSH is active in fact when i try to connect via SSH to the Asustor, it’s responde correctly. I used port 22 for SSH of Asustor and port 49165 for SSH of Gitlab. Anyone can help me? Thanks
Check first if you have a GIT_SSH environment variable which would not use ssh.exe from Windows (C:\Windows\System32\OpenSSH\ssh.exe) or from Git (C:\Program Files\Git\usr\bin\ssh.exe)

In general, there is no need for PuttyGen to manage SSH connections on Windows.

If your GitLab runs in a Docker container on your NAS, you might need to map its internal SSH port to the host (Asustor) port 22
Post Reply

Return to “Virtualization”