cast (n.)youdaoicibaDictYouDict
mid-13c., "a throw, an act of throwing," from cast (v.). In early use especially of dice, hence figurative uses relating to fortune or fate. Meaning "that which is cast" is from c. 1550s. Meaning "dash or shade of color" is from c. 1600. The sense of "a throw" carried an idea of "the form the thing takes after it has been thrown," which led to widespread and varied meanings, such as "group of actors in a play" (1630s). OED finds 42 distinct noun meaning and 83 verbal ones, with many sub-definitions. Many of the figurative senses converged in a general meaning "sort, kind, style" (mid-17c.). A cast in the eye (early 14c.) preserves the older verbal sense of "warp, turn."
ship (n.)youdaoicibaDictYouDict
Old English scip "ship, boat," from Proto-Germanic *skipam (cognates: Old Norse, Old Saxon, Old Frisian, Gothic skip, Danish skib, Swedish skepp, Middle Dutch scip, Dutch schip, Old High German skif, German Schiff), "Germanic noun of obscure origin" [Watkins]. Others suggest perhaps originally "tree cut out or hollowed out," and derive it from PIE root *skei- "to cut, split."

Now a vessel of considerable size, adapted to navigation; the Old English word was used for small craft as well, and definitions changed over time; in 19c., distinct from a boat in having a bowsprit and three masts, each with a lower, top, and topgallant mast. French esquif, Italian schifo are Germanic loan-words.

Phrase ships that pass in the night is from Longfellow's poem "Elizabeth" in "Tales of a Wayside Inn" (1863). Figurative use of nautical runs a tight ship (i.e., one that does not leak) is attested from 1965.