title: Can I test authentication with an RSA key locally?
body: <p>Is there a way to check locally if you're providing the correct passphrase to an RSA key?</p>
  
  <p>I recently had trouble pushing some commits to github because the push prompted for a password and then failed authentication. I verified that github had the correct public key for the <code>id_rsa</code> file in my <code>~/.ssh</code> directory, and I verified that I could authenticate with Github (if you <code>ssh git@github.com</code> it will tell you you authenticated but that they don't offer shell access,) so I knew the problem was on my end, not Github's.</p>
  
  <p>(I should point out that at this point I simply used <code>git format-patch</code> to get my commits as files, then blew away my working repository and re-cloned from Github, reapplied the patches using <code>git am</code>, and pushed without any trouble, so whatever the original problem was, it's fixed.)</p>
  
  <p>This left me wondering, though: how would I know if an authentication problem with a remote host was me providing the wrong passphrase to my private key, or the remote host not recognizing my key? Is there a way to do a test authentication with the private key, locally, without trying to connect to a remote host?</p>