Does it has to do anything with the installation of openssh* and puppetserver? Or do I have to do some configuration to either foreman or puppetserver?
There are similar questions in this forum, however, none solved my problem:
Okay, the solution is to create a fully qualified domain domain name (FQDN). I did it this way (src; also answered here):
Change the server IP to a static one. I reserved the IP address in the router and left the server in DHCP mode; one might apply a static address on the server itself.
Set a fully qualifed host name, like foreman.example.com using the hostnamectl set-hostname foreman.example.com command.
Edit (append) the /etc/hosts file to redirect the host name of the server (step 2) to its IP (step 1); one can use this command: echo "192.168.1.50 foreman.example.com" > /etc/hosts (of course, change the IP and the hostname).