"But when entering a none home port who is to say."
Entering a port is not the same thing as entering the US. You enter the US some 3-200 miles offshore, as you enter the territorial waters. And yes, these days? Big Brother has been tracking you, especially near south american waters and known drug sources.
You may be asked to show your log or other proof of where you've been and where you're coming from, but any harbor patrol can stop you and ask the same thing anywhere. Even in Kansas.