Omnibus Gitlab - ssh connection refused

ssh

#1

Hi folks,

I have hosted Gitlab solutions on AWS. My gitlab servers are running behind ELB. I am trying to clone the repo first time over SSH and getting connection refused error. I have also opened up SSH port in ELB SG. Also, added the following in ~/.ssh/config file.

Host mygitserver.com
  Preferredauthentications publickey
  IdentityFile ~/.ssh/example_com_rsa

Can you please guide me what is wrong with my SSH connection?


#2

do you use “User git” in your ssh config (or your command)? Gitlab uses a general git user and recognizes the user according to the ssh key.


#3

I am using “git” as a user; however, I have SSH key configured with different user name


#4

you can try to directly login with ssh, that should give you a “Welcome to GitLab, $USERNAME” reply and directly close the connection.
That, at least, is a bit faster and direct to test (so you can change port or other variables) your connection.