My VPS provider recommends that I leave my SSH port to the custom port number they assign it by default (not 22). The thing is, while I know I can provide the port number when creating a remote config, it seems I can't do the same when doing a Git clone. I am using gitolite so the clone commands look like:
git clone [email protected]:gitolite-admin
Is there a way to covert this to using the custom SSH port number?
I should also mention I am running Cygwin on Windows. I have seen multiple places saying to add the custom port to the ~/.ssh/config
file:
Host mydomain.example
Port 12345
However in Cygwin, that file does not seem to exist.
.ssh/config
(notconf
) in your user’s home directory. It is not required for basic operation, and thus does not exist by default. You will have to create it. Tryvim ~/.ssh/config
(or use your preferred, installed text editor) to open/create it./Users/USERX/.ssh/config
you need to set yourHOME
local environment to/Users/USERX
.