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.

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)

share|improve this question
1  
I think this question might better be suited at ServerFault –  Peter Manton May 13 '11 at 18:32

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.