This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Manual Steps
Veerendra edited this page Feb 15, 2023
·
14 revisions
*Below documentation referred
user
asveerendra
,hostname
asatom
and IP as192.168.0.120
. Please change these values according your requirement
- Download RaspberryPI OS Imager
Configure hostname
, user
, wlan
and locale
like below by clicking ⚙️ and click WRITE
Below command should run on your machine(that you connect Pi)
-
Copy ssh keys to Pi for password less authentication
$ PIUSER="veerendra" $ PIIP="192.168.0.120" $ ssh-copy-id $PIUSER@$PIIP veerendra@192.168.0.120's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'veerendra@192.168.0.120'" and check to make sure that only the key(s) you wanted were added.
-
Add ssh config
cat >> ~/.ssh/config <<EOF Host atom HostName 192.168.0.120 user veerendra EOF
Below command should on Pi
-
Login into Pi and Set
root
user passwordveerendra@atom:~$ sudo passwd New password: Retype new password: passwd: password updated successfully
-
Make the user
sudoer
- Login into pi and run below commands
veerendra@atom:~$ PIUSER="veerendra" veerendra@atom:~$ echo "$PIUSER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$PIUSER [sudo] password for veerendra: veerendra ALL=(ALL:ALL) NOPASSWD: ALL
- Make sure you specify same user and IP in inventory.yml#L5-L6
-
(Optional)Set static IPs to interfaces
- This will also bring up the
eth0
internface which some won't come up by default
# Set static IP for eht0 $ { sudo netplan set ethernets.eth0.dhcp4=false sudo netplan set ethernets.eth0.addresses=[192.168.0.120/24] sudo netplan set ethernets.eth0.gateway4=192.168.0.1 sudo netplan set ethernets.eth0.nameservers.addresses=[1.1.1.1] sudo netplan try } $ sudo netplan apply # Set static IP of wlan0 $ { sudo netplan set wifis.wlan0.dhcp4=false sudo netplan set wifis.wlan0.addresses=[192.168.0.130/24] sudo netplan set wifis.wlan0.gateway4=192.168.0.1 sudo netplan set wifis.wlan0.nameservers.addresses=[1.1.1.1] sudo netplan try } $ sudo netplan apply
- This will also bring up the