Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Server A needs to connect over svn+ssh to Server B to grab some source files for deploying on Server A. My deployment script runs from my local dev machine via:

ssh serverA 'bash -s' < deploy.sh 

I have a passphraseless public/private key pair set up between Server A and Server B. When I log in a local session to Server A, I have keychain setup and svn+ssh connections to Server B aren't a problem. The deploy.sh script runs successfully on Server A from a local session. However when SSHing into it from my dev box the same script will not run remotely.

What way do I call ssh-agent from my deploy script to get Server B to accept connections from it when I run the commands remotely on Server A?

share|improve this question
add comment

1 Answer

Try using -A option in order to forward auth agent connection, something like this:

ssh -A serverA 'bash -s' < deploy.sh
share|improve this answer
add comment

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.