Setup NanoPi NEO PLUS2, with SSH over wifi
Flashing Image
- Visit: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO_Plus2#Get_Image_Files
- Download the file
h5_sd_friendlycore-focal_4.14_arm64_20210615.img.zip - 385 MB
- Flash the OS image to a SD Card - Recommended: Balena Etcher
Wifi
Disconnet and connect the SDCard, so
boot
,rootfs
, anduserdata
shows upPlace the file
/etc/NetworkManager/system-connections/SSID_NAME.nmconnection
underrootfs
mounting point.WARNING
Replace SSID_NAME and WIFI_PASSWORD with proper values
properties# /etc/NetworkManager/system-connections/SSID_NAME.nmconnection [connection] id=SSID_NAME uuid=aec33f43-d86c-4a88-affa-283e704262d9 # change this to any other valid UUID v4 type=wifi interface-name=wlan0 [wifi] mode=infrastructure ssid=SSID_NAME [wifi-security] key-mgmt=wpa-psk psk=WIFI_PASSWORD [ipv4] dns=1.1.1.1; method=auto [ipv6] addr-gen-mode=stable-privacy method=auto
# /etc/NetworkManager/system-connections/SSID_NAME.nmconnection [connection] id=SSID_NAME uuid=aec33f43-d86c-4a88-affa-283e704262d9 # change this to any other valid UUID v4 type=wifi interface-name=wlan0 [wifi] mode=infrastructure ssid=SSID_NAME [wifi-security] key-mgmt=wpa-psk psk=WIFI_PASSWORD [ipv4] dns=1.1.1.1; method=auto [ipv6] addr-gen-mode=stable-privacy method=auto
Change the permissions to
0600
:sudo chmod 0600 /media/wesley/rootfs/etc/NetworkManager/system-connections/SSID_NAME.nmconnection
sudo chmod 0600 /media/wesley/rootfs/etc/NetworkManager/system-connections/SSID_NAME.nmconnection
SSH
- Create the
.ssh
, e.g:sudo mkdir /media/wesley/rootfs/root/.ssh/
sudo mkdir /media/wesley/rootfs/root/.ssh/
- Create
.ssh/authorized_keys
with your Pubkey added to it, e.g:sudo cat ~/.ssh/id_rsa.pub >> /media/wesley/rootfs/root/.ssh/authorized_keys
sudo cat ~/.ssh/id_rsa.pub >> /media/wesley/rootfs/root/.ssh/authorized_keys
Boot and login
- Inject the microsd in the board and power on.
- Wait a few seconds and go to your Router's page, in network page check for the new device connected:
NanoPi-NEO-Plus2
. ssh root@NanoPi-NEO-Plus2
, or use the IP address.
INFO
If you face any problems during boot, power-off the device, eject the microsd and check out log files like syslog
, dmesg
, auth.log
and kern.log
under /userdata/root/var/log
.