Project

General

Profile

Actions

Bug #6022

closed

puppetssh fails due to host key prompt when trying to do puppetrun

Added by Stephen Herd almost 10 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Puppet
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I've configured settings.yml to allow puppet runs over ssh

But on the remote server I just get "Connection Closed by x.x.x.x". After playing around with things manually (enabling login for foreman-proxy and running commands myself), I discovered that foreman-proxy was silently failing because of the host key prompt.

I added:
cmd = []
cmd.push(which('sudo')) if SETTINGS.puppetssh_sudo
cmd.push(which('ssh'))
cmd.push("-o StrictHostKeyChecking=no")
cmd.push("-l", "#{SETTINGS.puppetssh_user}") if SETTINGS.puppetssh_user

in

foreman-proxy/lib/proxy/puppet/puppet_ssh.rb

and everything seems to work correctly.

Actions

Also available in: Atom PDF