I want to ssh to the raspberry server automatically . I am able to get the ip of the pi from the following script.
Code: Select all
sudo arp-scan 192.168.0.100-192.168.0.200|grep "b8:27:eb"|awk '{print $1}'
Thanks in anticipation.
Code: Select all
sudo arp-scan 192.168.0.100-192.168.0.200|grep "b8:27:eb"|awk '{print $1}'
Code: Select all
sudo arp-scan 192.168.0.100-192.168.0.200|grep "b8:27:eb"|awk '{print $1}'= a;ssh pi@$a
awk: cmd. line:1: {print $1}=
awk: cmd. line:1: ^ syntax error
ssh: Could not resolve hostname : No address associated with hostname
I'm on a similar quest regarding ssh into Pi systems .deepakdeshp wrote: ⤴Thu Apr 26, 2018 6:57 am Hello,
I want to ssh to the raspberry server automatically . I am able to get the ip of the pi from the following script.
The result is 192.168.0.120 which is the ip of raspberry pi.Code: Select all
sudo arp-scan 192.168.0.100-192.168.0.200|grep "b8:27:eb"|awk '{print $1}'
Thanks in anticipation.