I'm attempting to use my Mac Mini as my "central server" in my local environment and then I develop on it, it runs nginx, php-fpm, etc. Everything is working fine. But I wish to do capistrano deployment and other tasks by SSHing it from my Macbook or iMac, but i'm running into permission problems.
For instance I share screen into the mac mini and run a git command such as...
ssh -A deploy@ipaddress 'git ls-remote firstname.lastname@example.org:username/mineproject.git'
I'll get the information back, however if I SSH into my mac mini and run the same command from my macbook, it'll give me "Permission denied (publickey). fatal: Could not read from remote repository."
Now I've added the SSH key generated to my Macbook, I can ssh into the mac mini without a key, I've tried adding every key I can and done SSH-COPY-ID between both machines. I've turned off passphrase on the keys as that was causing issues, but still things like this won't work unless I go to the actual mac mini and run it, which isn't ideal.
Any ideas how I can get it so my Macbook and iMac can run all commands if natively on the Mac Mini - is it to do with user account names? I would have thought once SSH'ed in it was as if I was running on that machine, the way it works with my linux server..