Step 1

Step 2

  • Now we need to create two files in raspberry pi boot folder inside the sd card.
  • First create a file named¬†ssh¬†(without any extension) using this command.
  • touch ssh
  • Create second file named¬†wpa_supplicant.conf
  • ctrl_interface=/var/run/wpa_supplicant
    country=<Insert country code here> # IN (INDIA)
     ssid="<Name of your WiFi>"
     psk="<Password for your WiFi>"
  • Now insert the sd card into your raspberry pi and power it on.

Step 3

  • Now we need to find the IP address of raspberry
  • Install nmap using this command
  • sudo apt install nmap
  • Now get your system ip address using command¬†ifconfig
  • Now scan your whole network using the command below
  • nmap -sn <your ip address>/24¬†
  • Note: replace your ip address last digit with 0. For example: with
  • Now you need to manually identify the ip address of your raspberry.
  • To verify the ip we need to ssh into the raspberry pi with each ip.

Step 4

  • For each ip ssh using the below command
  • ssh [email protected]<ip address>
  • Default password is raspberry
  • Now you have successfully logged in to your raspberry pi

Step 5

  • Now you are logged in as user pi¬†, which is the default user
  • Enable the root user for login using ssh
  • First Login with pi user using default password which is raspberry
  • Now write this command to login as root
  • sudo su
  • Now edit the file /etc/ssh/sshd_config using below command
  • nano¬†/etc/ssh/sshd_config
  • Change the text #PermitRootLogin without-password¬†to¬†¬†PermitRootLogin yes
  • Now save and exit file
  • Now to write the below command to restart ssh service
  • /etc/init.d/ssh restart
  • Now set your root password using the below command
  • passwd root
  • Now enter your password.
  • Once you have succesfully set the password, you can login to raspberry as root user using the below command
  • ssh [email protected]<raspberry ip address>