Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Setup The public keys are set up on a Macbook. I can do a passwordless push to github and a server (iMac) on the local network.

The Problem I know the keys are partially setup correctly, because I everything works if I'm sitting at the Macbook. What doesn't work is when I SSH into the Macbook remotely and attempt to push to github or to the iMac server. I'm prompted to input my SSH key passphrase.

What am I missing to enable pushing to github from the Macbook while logged in remotely from the iMac?

share|improve this question

2 Answers 2

A suitable SSH agent. You can either run an agent on your local machine, load the key into there, and enable SSH agent forwarding, or you can connect to the existing agent during the SSH session. I have no idea how the latter is done.

share|improve this answer
    
Are you saying that I need to upgrade ssh-agent? Or something? Actually, I don't understand your answer. –  kubi Jun 16 '10 at 1:19
    
If you want to use the agent on your local machine then you need two things. First, you need the agent to be running. OS X already has one, which is integrated with... whatever Apple calls their wallet facility. Second, you need to enable SSH agent forwarding. This is controlled in the SSH client and server configs. The relevant options are ForwardAgent and AllowAgentForwarding respectively. Once both are in place the SSH client on the remote machine will talk to the agent on the local machine, and you can store the passphrase on the local machine. –  Ignacio Vazquez-Abrams Jun 16 '10 at 1:47
    
For using the agent on the remote machine, you need to look at the environment variables created by the system on startup, and then you need to set them each time you log in via SSH. –  Ignacio Vazquez-Abrams Jun 16 '10 at 1:49
    
Thanks. When you say 'local machine' do you mean the machine I'm sitting in front of, or the machine I'm logged into (and attempting to git push) from? –  kubi Jun 16 '10 at 9:40
    
The local machine is the one you're sitting at. The remote machine is the one you're SSHed into. –  Ignacio Vazquez-Abrams Jun 16 '10 at 9:44

I've got a partial solution

$> eval `ssh-agent`
$> ssh-add
enter the passphrase here

The problem is that this solution isn't persistent as best I can tell. Plus, it appears that I'll be required to enter my passphrase at least once every time I login, which defeats the purpose. I'm not doing a lot of tasks like this, it's always just "login, push, logout".

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.