I am currently trying to ssh into my hosting server I have created authorised keys and added the .pub to my hosting.
To save the keys so I don't have to keep doing ssh-add I ran the command ssh-add -K ~/.ssh/privatekey
for each key. This worked perfectly for my MacBook which always connects, however this is not the case for my iMac.
With my iMac I can connect with my ssh key fine until I reboot the computer. Once I reboot I get prompted to enter a password. To stop this I also ran the -K
command. Which added the identities and allowed me to connect, but unlike my MacBook I am still having to run ssh-add every time I want to connect to my hosting on my iMac. When my iMac asks for the password and, if try to enter the ssh passphrase I get access denied.
I have set up a config file, but nothing seems to work for my iMac. I am also running the latest version of macOS Sierra on both machines.
After searching for days on Google and talking with my hosting provider I keep getting the same answer to use ssh-add -K
. It just seems strange that it is not working.