This is a sample picture of generating a random port for Salt minion's SSH daemon from range 23-600 with a master.
The picture demonstrates the following situation:
- Generate a random number between 23-600 with Jinja
- Check whether SSH daemon is installed and SSH daemon configuration file is found in minion's system
- Replace the default port 22 or any other port number defined in minion's SSH daemon configuration file with the one we have generated with the master computer
- Check for any established SSH connections
- Tell minion to restart SSH daemon in order to set new settings for new SSH connections
- Use the newly generated port for minion's SSH daemon