Well, that depends. When you are on a submarine carrying nuclear weapons, the US doesn't want them in foreign ports, likewise they wouldn't want them in their ports. Fast-attack subs do go to foreign ports, as does the whole of the surface navy.
So I never did. Then I go to work at a SEAL team, so no ports for me there either!