More than 100 years ago, Hertz succeeded in transmitting signals over a few metres to a receiving antenna using an electromagnetic oscillator, thus proving the electromagnetic theory developed by Maxwell. Since this seminal work, technology has developed, and various oscillators are now available at the quantum mechanical level. For quantized electromagnetic oscillations, atoms in cavities can be used to couple electric fields. However, a quantum mechanical link between two mechanical oscillators (such as cantilevers or the vibrational modes of trapped atoms or ions) has been rarely demonstrated and has been achieved only indirectly. Examples include the mechanical transport of atoms carrying quantum information or the use of spontaneously emitted photons. Here we achieve direct coupling between the motional dipoles of separately trapped ions over a distance of 54 micrometres, using the dipole-dipole interaction as a quantum mechanical transmission line. This interaction is small between single trapped ions, but the coupling is amplified by using additional trapped ions as antennae. With three ions in each well, the interaction is increased by a factor of seven compared to the single-ion case. This enhancement facilitates bridging of larger distances and relaxes the constraints on the miniaturization of trap electrodes. The system provides a building block for quantum computers and opportunities for coupling different types of quantum systems.