Google- " Pig Tail Adapter". You plug it in to a 15A or 20A output receptacle in the portable generator and the other end to the boat's Shore Power Inlet. By plugging into the shore power inlet the power will be distributed through the boat to light fixtures, outlets and appliances. Be aware of the capacity of the generator so it does not get overloaded by using too many things at once. The generators can bring 20A or 30A receptacles but that is just for convenience to adapt to different cable, but the actual power is limited to the generator's out put. To prevent Carbon Monoxide poisoning always run generators in the open preferably where the wind will blow the exhaust away from the boat. A pig tail adapter for a 30A shorepower inlet sells for around $48.
View attachment 202456
The most popular portable generator among boaters is the Honda 2000; it is small, light, quiet and reliable with excellent weather proofing.