Forward signal from Uno to Mega, or vice versa

We´re programming a ROV, but the signal getting lost in a CAT6 cabel. So we wanna program a microcontroller and forward the signal to another. One micro controller on the ground, and the other is under sea level. Maybe we just need a power amplifier..?

Someone who knows the code to forward the script to another micro controller?