To the security officer on the quay the crew of the arriving ship is composed of potential terrorists who must be treated as such until they can prove otherwise.
To the crew looking down at the security inspectorate, with their guns and designer sunglasses, these people are visitors who have excessive powers and who must be endured. One would like to think that, with the passage of time, there might be some meeting of minds.
Ideally, part of the training of any security, customs or other official who has to deal with ships and seafarers would include a short voyage in a merchant ship, just to gain some idea of how they are operated, the pressures on those who work aboard them and an inkling of the seafarers' thought processes.
And that goes for all port state inspectors, not just those dealing with security, because the exposure would certainly be a useful experience.
And we often forget that there is, in fostering a more harmonious relationship between seafarers and security staff, a path to a more productive regime than one based on mutual suspicion and antagonism.
Co-operation and respect work wonders and people aboard ship, after all, need security every bit as much as do those ashore.