The word itself was typically a signum, a sign, as in Plautus's Miles Gloriosus:
M: cedo signum, si harunc Baccharum es.
P: amat mulier quaedam quendam.
M: Give the password, if you're one of these Bacchants.
P: A certain woman loves a certain man.
But in military contexts, a nightly password was usually written on a little piece of material (tessera). So by metonymy, the password could be called a tessera too, as in Frontinus:
Bello civili, cum Ategua urbs in Hispania Pompeianarum partium obsideretur, Maurus inter noctem tamquam Caesarianus tribuni cornicularius vigiles quosdam excitavit; ex quibus cum tesseram accepisset, alios excitans constantia fallaciae suae per medias Caesaris copias praesidium Pompei transduxit.
During the Civil War, when the city of Ategua in Spain (belonging to the Pompeians) was under seige, in the middle of the night, a certain Moor, [pretending to be] a tribute's adjutant, woke up some of the sentries, and after he had acquired the password from them [by pretending to check if they knew it], he woke up others, and by continuing this deceit, he managed to bring reinforcements for Pompey right through the middle of Caesar's troops.