Accessing git over ssh on a non-standard port

Simple ssh access to a git repo can be sufficient for a small dev team–but what if you’re using a non-standard ssh port?

The solution–do as Linus says. Use ~/.ssh/config.

My config now looks like this:

Remember that ~/.ssh needs to be 700 (read/write/execute for only the owner), and the files inside are all 600:

Posted in Technical HOWTOs Tagged with: , ,
  • Tilo

    another way to do this is to set up your remote repository that way , e.g.:

    git remote add public ssh://

    (see: )

  • Rafael Lopes


  • Rasmus Hagen

    This did the trick. Thanks.