Remote Action (ssh): Authentication Failure

Latest response

Hello,

im trying to run a simple remote action:
Run mkdir /home/user/helloworld

But my output says:

Password:
su: Authentication failure

Exit-Status: 1

Dynflow Console input:

ssh_user: rexuser
effective_user: root
effective_user_method: su
cleanup_working_dirs: true
sudo_password: password
ssh_port: 22
hostname: svhost
script: mkdir /home/user/helloworld
execution_timeout_interval:
connection_options:
retry_interval: 15
retry_count: 4
proxy_url: https://rhs.company.de:9090
proxy_action_name: ForemanRemoteExecutionCore::Actions::RunScript
locale: en
current_timezone: UTC
current_user_id: 6
current_organization_id: 1
current_location_id: 2

Dynflow output:

proxy_task_id: 9a2c2a2a-6f8b-41e5-b555
proxy_output:
result:
- output_type: stdout
output: 'Password: '
timestamp: 156170287.1324
- output_type: stdout
output: "su: Authentication failure\r\n"
timestamp: 15617023.13514
runner_id: 0c153e08-472e-4a2b-884f
exit_status: 1

The host is running RHEL6.3, Satellite is 6.5.0.
Any suggestions?

Thank you,
Benedikt

Edit 16.07.19:
SSH to host via foreman key

Responses

Hello, are you following the procure in the docs Running Jobs on Hosts?

In particular, see 'Distributing SSH Keys for Remote Execution'. You can try to SSH to the client as that foreman-proxy user.

Hello, yes, we followed the steps on the doc, but we want to use execution users instead of root, because root via ssh is not allowed on the host. ssh to the host with the foreman key is also possible by the remote user, the problem seems the following 'su'.

I've uploaded a screenshot on the first post.