First pairing
You pair two devices once. Afterwards they find each other and connect by themselves. This page pairs two devices with the command line. The desktop app and the phone app do the same steps with buttons.
You need easysync on both devices. One device invites, the other joins. Both people look at the screen: a pairing needs a person on each side.
Steps #
On the first device, start an invitation.
easysync pairThe command prints a pairing code and, in a terminal, a QR code. The code is valid for 180 seconds and can be used once. Treat it like a password until it has expired: anyone who has it can try to pair with you.
On the second device, join.
easysync joinThe command asks for the pairing code. Paste it, or scan the QR code with the phone app. The code is read from the prompt and never from the command line, so it does not end up in a process list or in the history of your shell.
Both devices now show a confirmation code of six digits and the name of the other device. Compare the digits on the two screens. If they are the same on both, answer
yon both devices. If they differ, answer anything else: the pairing stops and nothing is stored.When both sides have confirmed, each device prints that it is paired. The two devices trust each other from now on, until one of them revokes the other.
Check the result on either device:
easysync peer list
If the devices are on different networks #
The pairing code contains the address of the inviting device and, if a relay is set up, the address of that relay. Two devices behind different routers can pair through the relay. Add a relay on the inviting device before you start the invitation:
easysync relay add <url>
The command asks for the relay's access token. To let the joining device keep using this relay after the pairing, add it with --shared, as in easysync relay add <url> --shared; otherwise add the same relay and token on the joining device too. Without a relay, or with the option --no-relay, the joining device must be able to reach the inviting device directly. How to run a relay is in Relay. A relay never sees the pairing code itself, but it does see the IP addresses and the timing of the connections; see What the relay sees.
What the confirmation code is for #
The six digits protect against someone who sits between the two devices and tries to pair with each of them in turn. Without the comparison, you could not tell. With it, such an attacker gets one guess per attempt and has a chance of one in a million. Pairing in detail explains this and what a mismatch means.
What is next #
- Send clipboard text
- Send a file
- Something went wrong: Troubleshooting