Add two RSA keys to ssh-agent
- Reply: Alexey Vyskubov : "Re: Add two RSA keys to ssh-agent"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 Jul 2024 07:51:12 UTC
Hello, I have two RSA keys (~/.ssh/id_rsa and ~/.ssh/4kid_rsa) which has to do with the transition from my old (2011) 1024-bits to a now 4096-bits key. During login I add both via ~/.profile to the agent with ... # ssh-agent # test -f ~/.sshrc && . ~/.sshrc # let's see if we really have some ssh-agent, if not launch one # ssh-add -l > /dev/null || { ssh-agent > ~/.sshrc ; . ~/.sshrc ; ssh-add ; ssh-add ~/.ssh/4kid_rsa } ... This asks me twice for the passphrase, i.e. for each of the keys. Both keys have the same passphrase. Is there a way to ask only once and use the same passphrase for both ssh-add calls? Thanks matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub I am not at war with Russia. Я не воюю с Россией. Ich bin nicht im Krieg mit Russland.