Extend cylinder and look for schratches. If is ok then just wash it inside with diesel fuel on both piston sides, 2-3 times, and connect to hydraulics. Then try it for leaks on rod outgoing side. I assume that cylinder hasn't bent rod.
Usually that's enough, and if no, replace seals.
Hope this helps.