This is the special case if you want dynamic ports. If you want to use static ports, all you need to do is to extend the PortObject[] constructor in the NodeModel, see here:
I changed the NodeModel and NodeFactory accordingly (used the second example). But how do I make the input port File System port (which could read data from the SSH Connector node)?