Some time ago I think about how to connect to a git server if it's on non standard ssh port. This case can occurs when you make port forwarding with ssh inside your network (look at -L key in man ssh), or if you want to avoid scanning your hosts by dumb bots.
At first I think about .git/config file and how can I force git to ask server on another port. But next I realized that's not question about git it's the question about ssh. And solution was really simple - put a host description into ~/.ssh/config
At first I think about .git/config file and how can I force git to ask server on another port. But next I realized that's not question about git it's the question about ssh. And solution was really simple - put a host description into ~/.ssh/config
Host myhost.xxxx
user imauser
Port 31337
No comments:
Post a Comment