2

Something is wrong with the way my Mac generates ssh keys. This has been the second time where I've created a key with ssh-keygen -t rsa. When I paste the created id_rsa.pub to use in a connecting service, it does not work correctly. But when I create it on another machine the same way, the public key works.

My question is how do I uninstall and re-install the key generation tool for Mac? And mac ports is installed if that matters.

5
  • By "paste the created id_rsa.pub", what do you mean? You run cat id_rsa.pub in terminal, highlight that, and paste it into the authorized_keys file on the server?
    – cjc
    Commented Jun 6, 2012 at 20:24
  • What do you mean by .. it does not work correctly? Are you getting any errors from ssh while connecting? Post them so we can help.
    – user13742
    Commented Jun 6, 2012 at 22:58
  • No, no errors. But whenever I generate a key on that server, and take the .pub and place it on another server, such as GIT, it never works. I've generated with passwords and without, same result and only when I generate it on my mac. Commented Jun 6, 2012 at 23:43
  • can u pls run 'ssh -V' on both the machines and put the output? Second can you pls tell which machines (OS, version etc) are involved? And which machine-2-machine it works?
    – havexz
    Commented Jun 7, 2012 at 2:44
  • 2
    Use ssh-copy-id instead of copy/pasting the existing key. Have a look at github.com/beautifulcode/ssh-copy-id-for-OSX Commented Jun 7, 2012 at 3:00

1 Answer 1

1

I wouldn't attempt to uninstall the ssh binaries packaged with OSX, it is asking for trouble. You can use macports or similar to install a side-by-side version in /usr/local/ or /opt/ and run that version instead.

However I do not suspect the OSX binary to be the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .