1

This question already has an answer here:

I recently upgraded my computer to macOS Sierra. Everything went fine, but somewhere along the way something got changed (probably something I did) and now every time I try to ssh into another machine the terminal prompts me to enter my password. If I type the password and enter it the ssh session works as normal. But why do I have to enter my password at all? What can I do to fix this?

Side note: I have tried changing the file permissions to no avail. They are currently 644 like the public key.

marked as duplicate by nohillside Oct 11 '16 at 5:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from serverfault.com Oct 10 '16 at 15:54

This question came from our site for system and network administrators.

  • private key should be chmod 400 add a -v and see if it's using your key – Jacob Evans Oct 10 '16 at 15:46
  • Done! Thanks. Problem still exists. Yes, it is using my key. – GrokSrc Oct 10 '16 at 15:48
  • private keys are... private. that's why you need the password. it wouldn't be private if it did not require a password. sure you can make a private key without a password... but that's obviously less secure. – ETL Oct 10 '16 at 15:48
  • It didn't used to require a password. – GrokSrc Oct 10 '16 at 15:49
  • Also see apple.stackexchange.com/questions/48502/… – Ben Creasy Feb 18 '18 at 23:40
3

You need add your private key to ssh agent again. I faced same problem after Sierra update.

Here is a guide to add your key.

  • This sort of worked. I added the key successfully using the ssh-add command but if I restart the terminal I am forced to do it again. I also tried the -K option for the command to add it to the keychain but after a reboot I still have to enter the password. – GrokSrc Oct 10 '16 at 16:32
  • Make sure that you have only one agent running, in my case, I need enter pw for each reboot, if you want 'the old behavior', follow this question – Vagner Oct 10 '16 at 18:53
  • 1
    Thanks @Vagner, ssh-add -A in my bash_profile fixed it. – GrokSrc Oct 10 '16 at 19:36
0

You can remove the passphrase

https://stackoverflow.com/a/112409/2774776

or import the key into the key with passphrase into your Mac user’s keychain:

https://superuser.com/a/269570/365431

  • Welcome to Ask Different. While the links you provided may answer the question, it's advisable to summarize and/or provide the relevant details that answer the question here. Links often go stale making the answer useless. – Allan Oct 10 '16 at 17:02

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