commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
when bad day comes...
Allow to launch nc like a daemon, in background until you still stop it.
(like this command: http://www.commandlinefu.com/commands/view/9978 )
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" .
Intentional hash in the beginning. May run a looong time. Wipes your data for real. Was meant to be /dev/urandom - I mistyped it. :-)