Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to automate some process into a machine. In a point of the process I need to create a dir and checkout some files into it. The protocol is svn+ssh, and with a user that is authorized into the server (so we don't need password). The problem is that when I try to checkout, system demands confirmation to add key permanently or only once.

Is there a way to say 'yes' in advance?

Edit: I'm ashamed. Forgot to say that client (the machine where automatization takes place) is a windows machine

share|improve this question
Have you looked at PuTTygen? That can supposedly import keys--I don't run any windows though, so I'm afraid that's about all I know of. – Bryan Agee Jun 1 '11 at 8:35
up vote 3 down vote accepted

The best scenario is to automatically add the host ssh key ahead of time, which will avoid the warning altogether, and assure that you have the right svn server. To do this, append the contents of the server's /etc/ssh/ to each client's /home/user/.ssh/known_hosts .

Alternatively, you can turn off host checking for a single ssh connection:

ssh -o StrictHostKeyChecking=no

or for svn+ssh, add it to the /etc/ssh/ssh_config:

StrictHostKeyChecking no
share|improve this answer
Thanks for your answer. I forgot to say that is a windows machine. Could you point me how to do the same into a win machine? AFAIK win machine doesn't have ssh_config or known_hosts files. – Killrazor Jun 1 '11 at 8:28
Are you using cygwin, or putty? – Bryan Agee Apr 5 '12 at 20:12

Your Answer


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.