They like it dark and quite ..... Take mothballs and place the inside of sock(s) and if you have something that vibrates, plug it in and leave along the transom.
The smell of the mothballs (outside the transom area) and constant vibrating noise will discourage them. And YES I'm speaking from...