I suppose with all the complicated security regulations, procedures, guidelines, protocols etc these days they are something that we are all at risk of breaching these days Seawalker.
I sought advice about this from a family friend who was a former Queens Counsel Lawyer and politician here in Australia and he advised me there was nothing a port authority could do about you taking photos of ships or port infrastructure from a public place that is out side of the control of the port authority and even if you was picked up by the Police would need to prove your intentions were other than just a hobby or personal and it would be very hard for them to do so.