The blog about containerisation, virtual machines and useful shell snippets and findings

enable gitea to use ssh port 22

  1. Move original ssh service to other port, like 2022
  2. set gitea config to use port 22
    app.ini
[server]
DISABLE_SSH      = false
SSH_PORT         = 22
SSH_LISTEN_HOST  = 0.0.0.0
SSH_LISTEN_PORT  = 22
START_SSH_SERVER = true
  1. execute
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/gitea to enable usage of the port 22