Skip to content

SSH Port Configuration


Learn more about SSH protocol on Wikipedia page.

Changing Port in Application

  1. After installation and launch of the application, go to admin panel, settings section.

  2. Select change ssh port in remote url for project

  3. Enter the port specified during application configuration in ssh.server.port= line and click save.

    change_ssh.png

Links generated by the application will automatically adopt the required format.

Attention!

It's recommended to free system port 22, as these versions don't properly display ssh request commands!

You need to manually modify ssh request:

git clone ssh://git@gitflic.ru:1234/adminuser/test.git  

This request uses following parameters:

Parameter Description
ssh://git Protocol and git server specification. Must be present in request
gitflic.ru Your server domain name
1234 Port specified in ssh.server.port=1234 parameter in application.properties
adminuser User account
test.git Project name

Changing System SSH Port

Info

  • It's recommended to use official instructions from your SSH server provider.
  • Below are generalized settings for most popular sshd service
  1. Edit /etc/ssh/sshd_config file

    sudo nano /etc/ssh/sshd_config  
    
  2. Uncomment Port 22 line and change value to any available port e.g. 2255.

  3. Restart SSH daemon

    sudo systemctl restart sshd.service  
    
  1. Edit /etc/ssh/sshd_config file

    sudo nano /etc/ssh/sshd_config  
    
  2. Uncomment Port 22 line and change value to any available port e.g. 2255.

  3. After setting the port, you need to notify OS security system about changes. If skipped, SELinux will block SSH server during restart.

    sudo semanage port -a -t ssh_port_t -p tcp 2255  
    
  4. Restart SSH daemon

    sudo systemctl restart sshd.service  
    

Automatic Translation!

This page has been translated using automated tools. The text may contain inaccuracies.