When executing commands using Remote Execution they fail due to an authentication error. I have a single Foreman instance. I first added the plugins by running
foreman-installer --enable-foreman-plugin-remote-execution\ --enable-foreman-proxy-plugin-remote-execution-ssh
That did not seem to work for me so I tried the option with yum update and restarted the Foreman server. This installed a more recent version:>
---> Package tfm-rubygem-foreman-tasks.noarch 0:1.0.1-3.fm2_0.el7 will be updated ---> Package tfm-rubygem-foreman-tasks.noarch 0:1.1.1-1.fm2_0.el7 will be an update ---> Package tfm-rubygem-foreman-tasks-core.noarch 0:0.3.3-1.fm1_25.el7 will be updated ---> Package tfm-rubygem-foreman-tasks-core.noarch 0:0.3.4-1.fm2_0.el7 will be an update ---> Package tfm-rubygem-foreman_remote_execution.noarch 0:3.0.3-2.fm2_0.el7 will be updated ---> Package tfm-rubygem-foreman_remote_execution.noarch 0:3.2.1-1.fm2_0.el7 will be an update
Now when I ran a command I had a pie chart that immediately showed the remote command failed, giving the same reason as before.
The key was generated inside ~foreman-proxy/.ssh/ as id_rsa_foreman_proxy
I am able to connect the the remote host using the key.
-rw-------. 1 foreman-proxy foreman-proxy 1679 May 25 17:19 id_rsa_foreman_proxy -rw-r--r--. 1 foreman-proxy foreman-proxy 418 May 25 17:19 id_rsa_foreman_proxy.pub -rw-r--r--. 1 foreman-proxy foreman-proxy 828 May 25 19:46 known_hosts
I do not see any documentation where I can set the key to be used or is there a log to troubleshoot the issue with Remote Execution? I would like to confirm that it is using the key I’m thinking it is.
Foreman and Proxy versions:
Error initializing command: Net::SSH::AuthenticationFailed - Authentication failed for user root@