In running ssh with agent forwarding. This allows me to do hg/git pulls from my server from systems that I have been authorized to based on my local

i.e

ssh -A myserver
hg clone ssh://myreposerver/repo

However, my local known_hosts is not used when for the clearing of known hosts. This means I'll have to type "yes" after verifying the host is correct. That in itself is not so much of a problem, but I'm automating all of this, so I never get to see the input prompt.

i.e. I'm really doing this:

ssh -A myserver "hg clone ssh://myreposerver/repo"

Of course, I could simply copy the whole known_hosts file, but that's not really elegant and causes maintenance problems of itself. For example, every project runs on its own user account to provide an extra layer of security, and I don't want to copy the known_hosts file to every user.

Any idea on how to do "known_hosts" forwarding?

=====

EDIT for workaround:

ssh -t -A myserver "hg clone ssh://myreposerver/repo"

Forces a pseudo tty allocation, which means in practice that I can at least send "yes" to the remote call of ssh (that is itself being called by hg)

link|improve this question

60% accept rate
1  
I think this question might better be suited at ServerFault – Peter Manton May 13 '11 at 18:32
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.