Tuesday, 21 July 2015

SSH into Galileo Board or Raspberry pi which is not having static ip address


To set static ip in linux we have to modify the file “/etc/network/interfaces”. But we can’t find this file in yocto-linux(galileo board). 
 
So by default DHCP assigns dynamic ip which will change every time we reboot the board.

To know the ip we have to use the tool nmap which can scan the ip addresses of hosts which are connected to the network.

First install the nmap tool in the host pc

sudo apt-add-repository ppa:pi-rho/security
sudo apt-get update
sudo apt-get install nmap

Before connecting the ether net cable to board first scan the hosts which are present on the network

$nmap -sP IPaddress/netmask

For example my pc ipaddress is 192.168.84.37 and subnetmask is 255.255.255.0(24 mask bits)

so

$sudo nmap -sP 192.168.84.37/24

Do the same after connecting the board and compare the list of hosts present in two lists

then

$ssh root@ipaddress

Done...................