I created a pull request per Ohad for bug report Bug #5561: foreman-proxy run puppet over ssh doesn't work - Smart Proxy - Foreman.
Running foreman(1.4.3) and foreman-proxy (1.5.0-0) on Rhel 6.2, I found that the only way to get puppet run over ssh to work is to remove the space between -l <user> and -i <keyfile> in puppet_ssh.rb.
However, I am unable to test this on any other OS at this time.
@@ -6,10 +6,10 @@ def run
cmd = []
cmd.push(which('sudo')) if SETTINGS.puppetssh_sudo
cmd.push(which('ssh'))
-
cmd.push("-l #{SETTINGS.puppetssh_user}") if SETTINGS.puppetssh_user
-
cmd.push("-l#{SETTINGS.puppetssh_user}") if SETTINGS.puppetssh_user if (file = SETTINGS.puppetssh_keyfile) if File.exists?(file)
-
cmd.push("-i #{file}")
-
cmd.push("-i#{file}") else logger.warn("Unable to access SSH private key:#{file}, ignoring...") end