Salama bin Akwa reported,

The Prophet ﷺ said, "Any man and unmarried woman who agree to live together for three nights, if they wish to extend the period they may extend it, and if they wish to part ways they may part ways."

Azami 6467

Sahih

عن سلمة بن الأكوع

أن النبي ﷺ قال: أيما رجل وامرأة أيم تراضيا بعشرتهما ثلاث ليال، فإن أرادا أن يتزايدا تزايدا، وإن أرادا أن يتشاركا شاركا.

الأعظمي 6467صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Prohibited marriages in Islam
Section
Mutah marriage and the explanation of its abrogation
Numbering
Jami al-Kamil 6467 (2nd edition)
Azami 6467