问题
I added my existed public key to ssh-agent but after restarting I need to run
ssh-add ~/.ssh/id_rsa
to add it again. Is there a way to add it permanently?
回答1:
You can not do that. You would need some secure store for the passphrase and you don't have it in ssh-agent
. By storing the passphrase in plaintext, you basically downgrade the security to none (and you would better do by removing the passphrase completely).
There are applications in GNOME that store the passphrase securely encrypted with the account password (gnome-keyring
, seahorse
), but pure ssh-agent
does not know that.
来源:https://stackoverflow.com/questions/45375041/how-add-public-key-to-ssh-agent-permanently