on the appserver and any CM/NSH clients you need to edit the 'default' line in the secure file and change the port.
has such a change a global scope?
i mean: once i change the port on the appserver, does it call all the agents on that port or is it possible to change the port only for a couple of agents that may have a port conflict with another installed application?
If you change the "default:"-line that will change all outgoing connections but you can add a ":"-line before default with settings only for the host named.
In that case, I think the order is important, so you want to do something like:
default should always be at the end.