About 20 something years ago, I lived in Panama City Beach, Fla at a place called Bay Point. I kept my then 43 DC at the marina in the compound.
One morning while doing some chores on the boat I heard someone yell "water moc" and I saw this good size black snake slithering on the dock. Someone called the dockmasters office and one of the employees came running down with a shovel. When he swung at the snake (and missed) the thing got rather annoyed and started chasing him. Well he got away, the dock employee that is, the snake just kind of hung around. Well not wanting to be aprehensive about walking down the dock, I did what most red blooded American boys would ---- I went down into my boat and retreived a snake deterent tool also known as a gun, walked to within a safe distance of the intruder and eliminated him.
In your case, I would not recommend using my kind of snake deterrent tool inside your boat. Many years ago I learned of a very effective material to control snakes around your shrubs etc in your yard which I believe will work on your boat. It's called Rotanone dust (check spelling) and is available in most garden supply stores. The material was developed to control insects on flowers, especially Roses but it has a very fast deadly effect on cold blooded animals which includes not only insects but fish and reptiles. Toxicitity to humans and domestic pets (cats & dogs) is pretty low having very high LD-50 numbers (measure of toxicitity to mammals). After applying the dust wait a day or so and take a vacuum cleaner and after disposing of the body, just clean up the dust.
Walt