It is currently Tue Jan 25, 2022 9:58 am
All times are UTC + 8 hours

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.

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

Postby pfuturo » Wed Dec 22, 2021 10:42 pm

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
pfuturo
 
Posts: 1
Joined: Wed Dec 22, 2021 10:36 pm

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

Postby ndl101 » Sun Jan 23, 2022 11:46 pm

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)
ndl101
 
Posts: 50
Joined: Sun Jul 11, 2021 4:32 pm

Return to Virtualization

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 2 guests