you can do this with any piece of wire, or with an audio cable. You should additionally connect at least one GND wire between the two boards. In principle, there is no need for a resistor in between, but adding a 330ohm to 1k resistor will protect the boards if you find yourself with one board powered off while the other one is driving the pin high.