Prefix code

A prefix code was a six digit number programmed into a Starfleet starship's computer that allows someone to take control of a specific starship. These codes are intended as anti-hijacking measures, but have been used for negative purposes. 

In 2285, the crew of the USS Enterprise (NCC-1701) accesed the prefix code of the USS Reliant (NCC-1864) in order to stop Khan Noonien Singh from using the Reliant against Enterprise. 

In 2364, Captain requested that Ensign Jenny de Luz get the USS Enterprise (NCC-1701-D)'s prefix code, but de Luz didn't get it for him. 

In 2367, Captain Jean-Luc Picard gave the Cardassians the USS Phoenix (NCC-65420)'s prefix code when it was attacking Cardassian starships.