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:

Host my.servername.org
  Port 1234

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

$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/*

Related posts:

  1. 50,000 photos in iPhoto on a shared laptop and external drive
    I’ve got over 100GiB of photos (JPEG and RAW) taken over the years, and they don’t comfortably fit on a laptop. The laptop is also shared by everyone in my......
  2. Secure VNC with ssh port forwarding
    Need to help out a damsel in distress (username “damsel”) sitting on a remote debian/ubuntu box (“remotehost”)? Have you set up ssh on a non-standard port (port 12345) already? Great.......
  3. Free and Easy Encrypted Storage for Mac OS X and MobileMe or DropBox
    Online storage services like iDisk (part of MobileMe) or DropBox are very convenient for sharing and backing up files–but when you put files into the cloud you’re assuming that: those......
  4. Apache2, PHP, and MySQL on Mac OS X using MacPorts
    1. Install MacPorts Follow the instructions here: http://www.macports.org/install.php. 2. Install apache2 sudo port install apache2 Note that the macports instructions suggest installing the launchctl script now, but we’ll do that......

This entry was posted in Technical HOWTOs and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Additional comments powered by BackType