Answer the question
In order to leave comments, you need to log in
How to add private key to SSH Agent permanently?
Each time before connecting to a remote server, I have to execute the command ssh-add ~/.ssh/key
to forward the key to this connection and have access to an external remote resource (in relation to the remote machine). How to make it permanent so as not to repeat this action every time?
Answer the question
In order to leave comments, you need to log in
The problem was solved by moving the keys to the root ~/.ssh from the subfolder.
After a reboot, they themselves are added to the agent.
If I'm not mistaken, then the key must be written in ~/.ssh/config in the form
Host remote.com
IdentityFile ~/.ssh/remote.com.key
You can add the key to the keychain ("Passwords and Keys" application in English seahorse ) and the key will be added to the agent at the time of logging into the system, there will be no need to enter the password separately from the key.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question