Maximum distance for AVR UART on 3.3V
I can't answer as to the maximum length, but at 9600 baud I wouldn't expect problems at a metre or two, let alone 10cm. Just ensure there is a good ground wire connecting the two boards. 

And that assumes it's permanently wired, and working in a typical lab environment, or your home, rather than in the engine compartment, or in orbit or on a mountain top. 

Even in the lab, if you plan to unplug and reconnect it regularly, add that info to the question and someone will advise on suitable ESD protection.