0

I started to use Chef to deal with DevOps automation and now I have a situation were there are two database servers(primary and secondary) being deployed using knife server create , and during the chef-client bootstrap processes, there is a recipe that deals with a script that activates database replication between these two nodes.

The problem is, this database replication involves a ssh at some point, but because these nodes are new, they don't know about each other (there is only the chef server machine in .ssh/authorized_keys), so if I run the script, it will get stuck asking for the ssh password...

I'm new to ssh keys, so what could be the best approach to handle this?

Thanks in advance.

3
  • Get SSH configured (including swapping SSH host keys) before you SSH.
    – womble
    Jul 6, 2016 at 23:31
  • @womble That makes sense, but its possible without inputing password? When knife server create creates the machine, it automatically adds the chef-server machine key as a 'authorized_key' Jul 7, 2016 at 18:35
  • I don't know about the chefisms, because I don't use it, but it's certainly possible to do because I do it with Puppet all the time.
    – womble
    Jul 8, 2016 at 0:16

0

You must log in to answer this question.

Browse other questions tagged .