Hosts file setup

First, open the hosts file, to see what's in there. Use the command highlighted in red:

Hosts file setup

.

Let's edit this file. You need to define a host name for a given address so that when you ssh the name, the Pis will recognize what IP address you are referring to. So, let's modify the hosts file (see the following screenshot). Enter the command sudo vim /etc/hosts and update the records with the highlighted text (substituting your own IP address):

Hosts file setup

Note

Remember to comment out 127.0.1.1 Mst0 with the # character, and then save the updated files ...

Get Build Supercomputers with Raspberry Pi 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.