[E] error while initializing command RuntimeError Unable to create directory on remote system /var/tmp/foreman-ssh-cmd-XXXX exit code: 255

There’s Administer > Settings > Remote Execution > Connect by IP. Alternatively you can set remote_execution_connect_by_ip to true as a parameter on host or hostgroup level.