Joe Maller.com

SSH Key Pair troubleshooting

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.

No related posts.


  • http://www.scribd.com James

    Wow, I’ve been having this infuriating problem for months .. thanks a lot for posting this!!

  • NK

    I just solved the problem I had with my virtual machine thanks to you! Great hint!

  • linlu

    Thanks, in my case the permissions to the .ssh directory were incorrect. Fixing that solved my problem! Too bad your article isn’t higher in google (pg 2 on my search).

  • Chandramohan

    Thanks a lot …….It solved my roblem