Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 git@bitbucket.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..

share|improve this question
    
Ok I've cracked it, you need to SSH into your server mac with the "-A" qualifier. So "ssh -A mac-mini.local" for instance. –  Daniel Jan 18 at 23:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.