Create a Bash command server – You can send it scripts or commands to execute
Allow to launch nc like a daemon, in background until you still stop it.
while ( nc -l 1025 | bash &> : ) ; do : ; done &
For send script or commands from the client to the server, use nc too, like that :
cat script.sh | nc server 1025
echo “service openvpn restart” | nc server 1025
The loop’s inside doesn’t do anything, but we can add echo -e “\nCommand received\n” .