The problem with saying "Yes sir, welcome aboard sir" to any LEO, is that now you have voluntarily consented to be searched. Much harder to later claim a violation of rights. Under those circumstances you don't need to be belligerent or uncivil, just ask "do I have a choice?" with a smile. If the answer is "yes", you can go either way, if the answer is "no" then you have not voluntarily consented to the search when it proceeds anyway.
I like your response above. I have been "pulled over" several times, boarded several times. The boardings were all by the Coast Guard. Very professional, not intrusive, heck, they already know if you have something to hide by your actions when first approached!
Anyway, I have had three "attempted boardings" by LEO's of various flavors, NOT USCG. One (Puget Sound, WA) asked if I minded whether they boarded or not, I said, "Yes, I mind, and don't give you permission, but I will in no way attempt to physically stop you if you insist." May not be my exact words, but words to that affect. He chatted a minute or two more with me and departed. Never boarded. Was polite, but didn't push the issue.
2nd "attempted boarding" was by a DNR officer, in Hawaii, while moored to a public dock, Sand Island, Hawaii. He stated he was going to board my boat, issue a citation for not having a HI registration on my boat, and generally search to his hearts content. I pointed out that vessel was Federally Documented, didn't require a state registration (that was in 2000, not sure about now), and he had no authority to board and search. That's the short version, anyway, he left in a huff.
3rd was in Puget Sound, I refused permission, but told him I couldn't stop him, asked for identification, he pointed to his pistol and the blue lights on his boat, stated that was his permission. Boarded, poked around, didn't find anything, because there wasn't anything to find, spouted off some very incorrect noises regarding safety equipment required, etc, then left. I reported the boarding to the USCG, who said it was a local LEO issue, then called a friend of mine in the local Sheriff's Dept, who stated, by all means, make a formal complaint, that ***kweed exceeded his authority, etc, etc. I got a nice letter back stating that the Police Dept would look into the matter. Found out from my friend that he was reprimanded, in writing, and required to attend "retraining". Problem hopefully solved.
I will not forcibly resist a boarding, but I will never give permission.
Now the scenario where someone boards my boat in the dark, without announcing themselves, I hope that never happens because it could get unpleasant very quickly, for both sides . . .