Indentifying my Pi in a Crowd

At the recent Raspberry Pi meeting run by Saman (great job) at Framigham Makerspace had 15 of us working. While many were connected using keyboards and monitors, some of us were trying to access our Pi through a shell (SSH/Putty) connection. Raspberry Pi comes with a secure shell server running.

There was an (expectable) issue with finding our IP number for our own Pi on the network. One link that I found useful told me how to set each Pi's name instead of the default "raspberrypi". At home, I could use my laptop browser to see the list on my router, but that option isn't good with somebody else's router. You need to know the router's root password which Saman or anybody else hosting a meeting wouldn't want to share.

http://www.howtogeek.com/167195/how-to-change-your-raspberry-pi-or-other-linux-devices-hostname/

Combine that with the Linux command to list the network hosts: nmap -sP 192.168.100.100-254 (This is the range at Saman's place.) and we would have a list of the IP numbers for every connected "host" on the local network. (nmap is also available for Windows and Mac: http://nmap.org/download.html)

I didn't have this note figured out while at the meeting. My unmodified Pi shows up at home as:

Nmap scan report for raspberrypi.home (192.168.1.153)
Host is up (0.0012s latency).

After making the changes recommended in the How-to-Geek article the Nmap scan shows this result for my Pi. I should be able to pick it out more easily at the next meeting.

Nmap scan report for atr-pi.home (192.168.1.153)
Host is up (0.0015s latency).

Everybody's out-of-the-box Pi has that same name, "raspberrypi". If each Pi has a unique name, it will be easier to identify which IP has been assigned by the DHCP process of the router. It will be easier to link to our own Pi through a shell connection.

If I want to know the Pi address by MAC address, use the command: sudo nmap -sP -n 192.168.100.100-254

Nmap scan report for 192.168.1.153
Host is up (0.00077s latency).
MAC Address: B8:27:EB:BA:71:5E (Raspberry Pi Foundation)

Jaime, a Windows user, also recommended the network scanner: http://www.advanced-ip-scanner.com/ (It is freeware. Nmap is more free as open source software always is, which is in keeping with the Raspberry Pi itself.)

Yet another network scan option is the open source Angry IP Scanner (ipscan) http://angryip.org/ which has downloads for Linux, Mac and Windows.

If you are having trouble with a shell connection because of the ssh key: http://askubuntu.com/questions/20865/is-it-possible-to-remove-a-particular-host-key-from-sshs-known-hosts-file