git remote add with other SSH port September 21, 2022 by Tarik You can just do this: git remote add origin ssh://user@host:1234/srv/git/example 1234 is the ssh port being used