I have three systems:
- New MBP (Catalina)
- Old MBP (El Capitan)
- Raspberry Pi (Raspbian Buster)
I want to SSH from the New MBP to the Old MBP, and then SSH from the Old MBP to the Raspberry Pi.
My final goal is to set-up an
rsync backup scheme between the Raspberry Pi and the Old MBP.
✅ I can SSH from the New MBP to the Old MBP without a problem.
✅ When I open screen sharing on the New MBP, connect to Old MBP and SSH from the Old MBP to the Raspberry Pi it works without a problem.
❌ When I SSH from the New MBP to the Old MBP, I can SSH from the Old MBP to the Raspberry Pi, but everytime it asks for a passphrase of the SSH key.
I followed these steps and found I had to set-up some different things as well on the Old MBP before they worked. So the complete things I did are:
- SSH from New MBP to Old MBP
- Start an SSH agent on the Old MBP:
eval "$(ssh-agent -s)"
- Add the key:
ssh-add -K ~/.ssh/id_rsaand
- Now I can SSH to the Raspberry Pi without a password prompt:
As long as I don't logout of the Old MBP session (from step 1) everything is fine. However, if I:
- close the New-Old SSH connection
- re-connect from the New MBP to the Old MBP
- Try to SSH to the Raspberry Pi
I get prompted for a passphrase again!
How can I get the
ssh-agent on the Old MBP remember the passphrase across different SSH sessions?