Ahh trolls, there everywhere are they not?
In the McDonalds playpens, there were the ball-pen bullies. There was the "lunchline liberator" in the sixth grade, and yes that was what we called him back in the day... You got the team quarterback that "knows it all" but secretly knows nothing yet, somehow, still has all the friends. And now in my older years, there's the common criminal, be it the guy stealing ladies purses or the neighbor kid trespassing through my backyard after school since "it's a shortcut and you don't have a fence".
Did I mention trolls are everywhere? Growing up, I had parents, teachers, my fists, (insert improvised weapon here), and landlords at my disposal to deal with those who thought they could pick me up by the collar. Did I use them... ehhh, no...
Point is, you can either stick up for yourself, try and talk yourself out of the situation or hide behind a friend. Pick your battles and know where you can go and where you should avoid. Since this is a video game, if the harassment is consistent then feel free to improvise. Use a low-end ship with dummy cargo, or better yet, leave a few special explosive prizes hidden away and let the ship be captured. Sooner or later they'll get tired of the zero-sum game and move onto a new target.
Did I mention that trolls are everywhere, even in real life? I did? Guess we'll just have to get used to it then?