So I already Set up Portainer Agent on that server and I can go to my Portainer WebGui to create a CentOS container with these compose docker and add command line to reboot our Host Server. It saves my time.
This will reboot the host, meaning will apply ssh too. So it will work to do then now I can access my host with my SSH PPK files.
version: '3.9' services: centos: command: bash image: centos volumes: - '/proc/sysrq-trigger:/sysrq' tty: true stdin_open: true
Run this compose then go to exec command to command line
echo b > /sysrq
Here you go, it reboots our host machine. Not docker itself. Which is anything you apply.