For some reason I’ve put off setting up SSH key pairs, probably having something to do with how arcane most of the setup instructions appear. Tonight however, I’m unexpectedly preparing to transfer a client to a new hosting account on Media Temple and enjoying key-pair access to their new repository.
Media Temple doesn’t yet support
svn:// access to Subversion repositories, only
svn+ssh://. So, having been pushed, I finally decided to make my life easier with SSH key pairs.
The best tutorial I found was Allan Odgaard’s: Subversion support and ssh key pairs. Without ssh key pairs, all the fantastic Subversion integration in TextMate won’t work with svn+ssh:// repositories.
However there’s one crucial piece of information missing from that: Permissions.
If access to the SSH configuration files is not properly assigned, the ssh pair won’t work. No meaningful errors at connect time, just silent, infuriating failure.
The ~/.ssh directory permissions need to be set to 0700 and the authorized_keys file needs to be set to 0600:
chmod 0600 ~/.ssh/authorized_keys
chmod 0700 ~/.ssh
If group or world have write access to authorized_keys, key pair authentication will fail.