1

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.

5
  • private key should be chmod 400 add a -v and see if it's using your key
    – Jacob Evans
    Commented Oct 10, 2016 at 15:46
  • Done! Thanks. Problem still exists. Yes, it is using my key.
    – groksrc
    Commented Oct 10, 2016 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
    Commented Oct 10, 2016 at 15:48
  • It didn't used to require a password.
    – groksrc
    Commented Oct 10, 2016 at 15:49
  • Also see apple.stackexchange.com/questions/48502/…
    – Ben Creasy
    Commented Feb 18, 2018 at 23:40

2 Answers 2

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.

3
  • 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
    Commented Oct 10, 2016 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
    Commented Oct 10, 2016 at 18:53
  • 1
    Thanks @Vagner, ssh-add -A in my bash_profile fixed it.
    – groksrc
    Commented Oct 10, 2016 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

1
  • 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
    Commented Oct 10, 2016 at 17:02

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