A non-transitory computer-readable recording medium storing computer-readable instructions for a terminal device, wherein
- the terminal device comprises:
- a wireless interface configured to execute wireless communication;
- and
- a computer,
- wherein the computer-readable instructions, when executed by the computer, cause the terminal device to:
- receive from a first server a plurality of pieces of related information related to a plurality of public keys of a plurality of communication devices;
- in a case where the plurality of pieces of related information is received from the first server, send to a first communication device among the plurality of communication devices a first authentication request in which a first public key of the first communication device is used via the wireless interface, the first public key being related to first related information among the plurality of pieces of related information;
- in a case where a first authentication response is received from the first communication device via the wireless interface in response to the first authentication request being sent to the first communication device, send first connection information to the first communication device via the wireless interface, the first connection information being for establishing a first wireless connection between the first communication device and an external device;
- in a case where the plurality of pieces of related information is received from the first server, send to a second communication device different from the first communication device among the plurality of communication devices a second authentication request in which a second public key of the second communication device is used via the wireless interface, the second public key being related to second related information different from the first related information among the plurality of pieces of related information;
- and
- in a case where a second authentication response is received from the second communication device via the wireless interface in response to the second authentication request being sent to the second communication device, send second connection information to the second communication device via the wireless interface, the second connection information being for establishing a second wireless connection between the second communication device and the external device.