Page MenuHomePhabricator

running sshd for vcs-user on a port other than 22
Closed, ResolvedPublic

Asked by apeacock21 on Sep 10 2015, 9:16 PM.

Details

The instructions for setting up ssh for git (https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/) require moving regular ssh to a port other than 22 so that phabricator can used ssh on port 22.

Is there a way to do the opposite? Leave normal admin-access sshd on 22 and make phabricator use 222 (or another)? The box we're running phabricator on also hosts other developer resources and services, and moving normal ssh to a non-standard port is not an option.

Answers

cspeckmim
Updated 3,165 Days Ago

The sshd_config specifies which port it runs on. Modify the one used for running SSHD for phabricator to run on non-22 port. Note that any repository URL will need to specify the port when doing a clone, etc.:

git clone ssh://git@server.com:222/repos..

You then need to set the diffusion.ssh-port config in Phabricator so it knows that it's not hosting them over the default port 22.

joshuaspence
Updated 3,161 Days Ago

I run both administrative and VCS SSH on port 22 with the following configuration:

1Match User vcs
2 AuthorizedKeysCommand /usr/src/phabricator/bin/ssh-auth
3 AuthorizedKeysCommandUser vcs
4 AllowUsers vcs

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.