Configure your pi with
sudo raspi-configWithin the menu, do the following
- change the name of your pi, for example 'pi1'
- allow ssh access
- change the password (and remember it)
restart the pi
Now, from some other unix computer, you want to scan the local network for connected devices. This can be done with nmap. You also need to know the IP address of your local network, which is normally 192.168.0 or 192.168.1, but better find it out with either ifconfig or ip addr.
Step by step:
- Install nmap
sudo apt-get install nmap- find your local networks IP address with either
ip addror
ifconfigIn this example, my devices IP is 192.168.0.131, so my local networks address is 192.168.0, 131 being my laptops number.
joker@joker-Ultrabook:~$ ifconfig
eth0 Link encap:Ethernet HWaddr e8:03:9a:ee:f4:2b
inet addr:192.168.0.131 Bcast:192.168.0.255 Mask:255.255.255.0
- search the network with nmap:
nmap 192.168.0.0/24
24 is shorthand for subnet mask 255.255.255.0
As a result, nmap shows you all devices in the network, including your pi. Of course the pi has to be connect to the network via cable or wifi:
Nmap scan report for pi1 (192.168.0.119)
Host is up (0.011s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
22/tcp open ssh
Nice, the pi is there, ssh is open, and its correctly named 'pi1'.
You could use its IP address 192.168.0.119 to ssh into it, but using the name is much easier.
ssh pi@pi1
Keine Kommentare:
Kommentar veröffentlichen