MacOS Keeps Asking for Login Keychain Password. When you change the user account password on High Sierra, macOS creates a new keychain for you. Or bring it up with Spotlight Search More Efficiently In Mac OS X With Our Top Spotlight Tips Search More Efficiently In Mac OS X With Our Top Spotlight Tips Spotlight has been a killer Mac. If you’re tired of the “Upgrade to macOS High Sierra” notifications nagging your Mac to install a system software update that you perhaps have made a conscious decision to avoid, then you will likely appreciate this tip to completely stop the upgrade macOS notifications.
Active1 year, 8 months ago
It used to remember the passphrase, but now it's asking it to me each time.
I've read that I need to regenerate the public key with this command, which I did:
but it didn't fix anything.
Mac Os Keeps Asking For Aol Password Os X High Sierra 2018 Lowered![]()
How can I make macOS remember my passphrase again?
JakeGould
34.8k1010 gold badges109109 silver badges150150 bronze badges
erwanerwan
3,01633 gold badges55 silver badges66 bronze badges
12 Answers
In the latest version of macOS (10.12.2), this is easy to fix. Just edit your
~/.ssh/config and enable the UseKeychain option:
There is no need to change anything else. Now everything works the way it used to work before the latest updates. You do not need to add keys to
ssh-agent .
Edit: You may still need to enter your passphrase once. If you don't know it, follow these instructions to reveal it.
Community♦
Jukka SuomelaJukka Suomela
11.7k22 gold badges1414 silver badges1313 bronze badges
I had the same problem. MacOS Sierra keychain keeps asking for the passphrase. Your id_rsa should be encrypted with a passphrase for security. Then try adding it to the keychain
ssh-add -K ~/.ssh/id_rsa
If your key is in another folder than
~/.ssh then substitute with the correct folder.
Keychain now knows your ssh key and, hopefully, all works now (mine did)
techraf
4,2381111 gold badges1818 silver badges3232 bronze badges
Lars G.Lars G.
1,82911 gold badge33 silver badges22 bronze badges
This fixed my similar issue:
This stores passphrases in your keychain.
Update (thanks @EasyCo):This works but does not persist between restarts. @jukka-suomela's solution on this page does work across restarts. You can find that answer here:
critikastercritikaster
I only had to enter the correct passphrase once and it started working. The problem was that I didn't remember my original SSH passphrase, but I recovered it by following these steps from Github:
Olli JaakkolaOlli Jaakkola
None of the above solutions worked after installing Sierra over El Capitan on a new MacBook Pro. Sierra by design does not save SSH keys in the keychain.
Two solutions worked for me. One is to add the command
ssh-add -A &> /dev/null to ~/.bash_profile. Every time you open the terminal, this command will be executed (the &> /dev/null part sends the output of the command the file /dev/null).
A more complicated but slightly slicker solution is to create a plist with the command that is executed every time the OS is booted as suggested in Saving SSH keys in macOS Sierra keychain. This involves using Xcode to create the file.
![]()
Hank SnowHank Snow
One fix is to add the following to your ~/.ssh/config file:
Taken from: https://www.reddit.com/r/osx/comments/52zn5r/difficulties_with_sshagent_in_macos_sierra/Also see: https://apple.stackexchange.com/a/264974/3810
Community♦
ThomasWThomasW
This morning, I had the same problem as you after updating to Sierra. In my case, the
id_rsa file was encrypted and after decrypting it was working like a charm.
After these steps, you should be able to use ssh again.
Martijn PietersMartijn Pieters
I tried multiple answers here, but was still having issues with remote keys passing (such as when using capistrano). To solve it, I read the technote from apple and made this my config file. No more asking for my password!
DavidPostill♦
113k2727 gold badges254254 silver badges284284 bronze badges
Geek GoddessGeek Goddess
I had this issue as well when attempting to deploy some code using Capistrano. Very frustrating. Here are two methods I know of to deal with this issue.
Method 1: Add all known keys to the SSH agent.
So one solution I found is to run
ssh-add with the -A option—which adds all known identities to the SSH agent using any passphrases stored in your keychain—like this:
Now this works but it won’t persist across reboots. So if you want to never worry about this again, just open up your user’s
~/.bash_profile file like this:
And add this line to the bottom:
Now when you open a new Terminal window, all should be good!
Method 2: Add only SSH keys that are in the keychain to the agent.
So while the
ssh-add -A option should work for most basic cases, I ran into an issue recently where I had 6-7 Vagrant boxes (which uses SSH keys/identities for access) setup on a machine on top of the more common id_rsa.pub in place.
Long story short, I ended up being locked out of a remote server due to too many failed tries based on SSH keys/identities since the server access was based on a password and SSH keys/identities are SSH keys/identities. So the SSH agent tried all of my SSH keys, failed and I couldn’t even get to the password prompt.
The problem is that
ssh-add -A will just arbitrarily add every single SSH key/identity you have to the agent even if it’s not necessary to do so; such as in the case of Vagrant boxes.
My solution after much testing was as follows.
First, if you have more SSH keys/identities added to your agent than you need—as shown with
ssh-add -l then purge them all from the agent like so:
With that done, then start the SSH agent as a background process like so:
Mac Os Keeps Asking For Aol Password Os X High Sierra 2018 Truck
Now, it gets weird and I am not too sure why. In some cases you can specifically add the
~/.ssh/id_rsa.pub key/identity to the agent like so:
Type in your passphrase, hit Return and you should be good to go.
But in other cases simply running this is enough to get the key/identity added:
If that’s all worked, type in
ssh-add -l and you should see one lone SSH key/identity listed.
All good? Now open up your
.bash_profile :
And add this line to the bottom; comment or remove the
-A version if you have that in place:
That will allow the SSH key/identity to be reloaded to the SSH agent on each startup/reboot.
UPDATE: Apple has now added a
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |