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://username@node.yourdomain.com:1234/home/username/GIT/Project.git

    (see: http://www.bramschoenmakers.nl/en/node/720 )

  • http://www.fotografiacotidiana.com.br Rafael Lopes

    WONDERFUL !!

  • http://twitter.com/rasmushagen Rasmus Hagen

    This did the trick. Thanks.