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

  • 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

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/ssh_host_rsa_key.pub 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
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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