Mini
Mini

Reputation: 1170

how add public key to ssh-agent permanently

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?

Upvotes: 1

Views: 2971

Answers (1)

Jakuje
Jakuje

Reputation: 26016

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.

Upvotes: 2

Related Questions