Well of course you can, but you'd be ignoring the safety instructions from the BSS.
These are the core points that should never be forgotten.
Never install a portable generator permanently or make unauthorised modifications that are not supported by the manufacturer, or proprietary component supplier
Never run generators on the boat, or on the bank near to doors, vents, windows and hatches. If you can smell exhaust fumes in the boat, it could mean the cabin is also filling with deadly carbon monoxide
Never refuel any generator anywhere aboard the boat; take it to the bank and ensure you are a safe distance from other boats and potential sources of ignition.
So when your boat fills up with CO and kills your girlfriend and daughter (as per the boater in the Lakes did) your insurance says you are not following instructions and therefore they revoke your cover and you end up in court for manslaughter whos' going to pay your costs ?