1. 程式人生 > >gitlab修改預設ssh埠

gitlab修改預設ssh埠

1.修改gitlab的gitlab.yml

/home/git/gitlab/config/gitlab.yml

修改gitlab_shell中的ssh_port 

gitlab_shell:
    # REPOS_PATH MUST NOT BE A SYMLINK!!!
    repos_path: /home/git/repositories/
    hooks_path: /home/git/gitlab-shell/hooks/


    # Git over HTTP
    upload_pack: true
    receive_pack: true


    # If you use non-standard ssh port you need to specify it
    ssh_port: 10000

-----------------------

然後重啟gitlab

2.修改 /etc/ssh/sshd_config

Port 10000

重啟sshd