First off, you don't know at all if it's SELinux, you just suspect something. Second, SELinux isn't as simple as "it allows x process to run or not", it's much more than that. There's source context, target context, and action, among others.
First you need to collect the denied actions. Start logging actions denied by SELinux:
tail -f /var/log/audit/audit.log | grep denied
Then start endlessh and see if anything comes up. If not, then it's not SELinux. If yes, then save those denied actions into a textfile, e.g. endlessh.log
.
Now tell SELinux to allow those actions:
audit2allow -i endlessh.log -M endlessh
semodule -i endlessh.pp
Now here comes the tricky part: SELinux will allow the specific action(s) found in the log file, but other, different actions might follow. Because an executable may do thousands of different things. It may wanna do things A, B, and C, but if SELinux blocks even action A, it won't even reach B and C, since it's already failed. So you need to keep iterating and adding those new denied actions, then restarting endlessh, until it finally works, and there's no new "denied" lines appearing in the audit log whatsoever, when you start endlessh.
Your other, probably more efficient option is to set SELinux to permissive, in which case it logs the denied actions, but doesn't actually deny them. In this case you can be sure that all actions you need to allow will appear in the log in just one run. To do this, edit /etc/selinux/config
:
SELINUX=permissive
Reboot, then do the log collecting and SELinux module installation, as explained above. Once all done, set SELinux back to enforcing:
SELINUX=enforcing
Reboot, and you're good to go.
More details: SELinux Crash Course