904 Shift cable removal

Assuming the transmission case is ok, the "O" ring on the end of the cable housing should be enough to seal it right there at the opening. If the oil is leaking out of a damaged cable housing, another way is to seal it using some liquid tool handle dip. You need to clean the housing real well first, and it's kind of a messy procedure. It might take a couple of dips to get it sealed properly. Otherwise, a replacement cable may be in your future.