Get the App
SLTechnology News&Howtos  ›  Network Security  › 

GitLab modified the default port solution when it encountered ssh.

Shulou Source: shulou.com Published: 2022-06-01 05:08:12 11月25日 Update

It is really easy for GItLab to use SSH key-free authentication, but when it is configured, it is found that the default port of ssh (22) has been modified, which is unreachable. Many partners have encountered this problem. After some thinking, I feel the need to modify the server configuration, here to write a specific blog, so that everyone less pit.

Modify step

1. Modify ssh port (skip this step) Port port 2, modify / etc/gitlab/gitlab.rb [the configuration in gitlab.yml will be overwritten by this] / / later modify your own ssh port gitlab_rails ['gitlab_shell_ssh_port'] = 213863 to make it effective. Gitlab-ctl reconfigure defaults to port 22, but no port will appear for direct access. )

Modified effect:

Test: (as long as ssh trust is done well)

Method 1:

Method 2:

Tags: Port configuration method step premise blog just key buddy partner effect time problem ease of use service testing authentication Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux Redmi MySQL Shulou Information