Foreman Remote Execution user

Hi,

I’ve configured remote execution on foreman, under settings I can choose the remote user to connect, but can I choose another user other then the foreman-proxy?

Thanks,
Bruno

Hello Bruno,

I’m a bit unsure what you mean by “choosing another user other than the foreman proxy”. Do you mean “to choose another user which would be used to open the connection”? Could you please expand a bit on that point?

Hi,

Yes, use other OS user to execute the action. I have one user created that we already use to deploy ansible playbooks, this user has sshkey, so to handle the user foreman-proxy I need to create another ssh key, deploy it to all the clients so I can execute commands or copy the other user ssh key to the foreman-proxy.

Thanks,
Bruno

In general foreman-proxy user is used because that is the user the foreman-proxy and smart_proxy_dynflow_core run as. When a job is triggered, it gets delegated to the proxy which opens the connection without doing any user switching.

In theory you could try running foreman-proxy and smart_proxy_dynflow_core under different user, but I can’t guarantee it won’t break things.

From my point of view the best would be what you suggested, either sharing the key between the foreman-proxy and your maintenance user or deploying the key proxy uses to the clients.

Hi, thanks for the reply.
I can understand that, and I’m using that approach, I was only asking to check if there’s was other option.

Once again thanks,
Bruno