Configuring openssh port in windows for msysgit

Quick question. I am using msysgit with openSSH as a git client. I do not want to use other ssh clients, such as putty. From git Bash, I successfully connected to my server using ssh -p XXXX for my server.

Unfortunately, when I try to do something like:

git clone git@SERVER :reponame.git 

from git bash I get:

 ssh: connect to host SERVER port 22 failed. 

How can I make an ssh connection that msysgit tries to open when running openssh on a different port?

I know that on linux such a thing would be in the / etc / ssh / ssh _config file, but how would I do this in this case? Thanks in advance.

+4
source share
1 answer

git supports the following syntax for ssh://

 ssh://[ user@ ]host.xz[:port]/path/to/repo.git/ 

Pay attention to the port there.

+6
source

Source: https://habr.com/ru/post/1334023/


All Articles