0x00 Preface explains

Recently bought a piece of Raspberry Pi Zero 2W Go Play City Sports , The purpose is to build a remote personal server , Put a blog on it 、 Light a light or something . Hence the article .

Raspberry pie official website address :https://www.raspberrypi.com/

0x01 SSH Connect

First of all, I was very confused after I bought it at first , So in google I found the following articles on the website, which helped me a lot .

I saw that youtube After the video above , I found that I can ask Taobao customer service to help me weld before I buy it gpio Pin . Then I found an electric soldering iron beside me , So I'm going to try ( Never welded ), The outcome is as follows

not so bad , It's not broken ! ha-ha , This is the result of doing it without reading the tutorial , Let's take a warning ! that , Follow the above tutorial to write the operating system to sd After the card is installed, the driver and ssh Connected to raspberry pie , A problem encountered when connecting is [email protected]'s password,ssh I can't log in , Look at the official discovery :

There are also mechanisms to preconfigure an image without using Imager. To set up a user on first boot and bypass the wizard completely, create a file called userconf or userconf.txt in the boot partition of the SD card; this is the part of the SD card which can be seen when it is mounted in a Windows or MacOS computer.

This file should contain a single line of text, consisting of username:encrypted- password – so your desired username, followed immediately by a colon, followed immediately by an encrypted representation of the password you want to use.

To generate the encrypted password, the easiest way is to use OpenSSL on a Raspberry Pi that is already running – open a terminal window and enter

echo 'mypassword' | openssl passwd -6 -stdin
This will produce what looks like a string of random characters, which is actually an encrypted version of the supplied password.

https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/

Simply put, raspberry pie doesn't use the default password for security reasons , So you need to start before boot Create one in the directory userconf.txt, The format is as follows :

username:encrypted-password

among encrypted-password It can be used echo 'mypassword' | openssl passwd -6 -stdin This command generates , Post the configuration I generated :

pi:$6$T12E4motTbeG7HXC$0vvzm.7sNj9bsEzVL2JT4P9OYXpvsk3lwqK6CzTVyyLrRdUA.fZVWrfzqmU./mmuU1O/i3xSueXPX4ieBjrCM/

That is, the user name is pi, The password for raspberry. To write sd After the card , Connect a wave again !

λ ssh [email protected] -p 22
Warning: Permanently added the ECDSA host key for IP address '169.254.155.237' to the list of known hosts.
[email protected]'s password:
Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Apr 4 15:41:56 2022 SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password. Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use. pi@raspberrypi:~ $

succeed !!!!!!!!!!!!!!! wow , Full of sense of achievement !

0x02 configure network

Input sudo raspi-config, Choose a country —> “System Options”—> Choose the first one —> Input WiFi Name password —> restart sudo reboot

pi@raspberrypi:~ $ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 10 bytes 1600 (1.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10 bytes 1600 (1.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.174.149 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::74a7:e6a5:d1b2:66e prefixlen 64 scopeid 0x20<link>
ether 62:ae:a7:2d:b5:2f txqueuelen 1000 (Ethernet)
RX packets 187 bytes 19160 (18.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 5905 (5.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 240e:379:1a87:b500:fc16:62d:3ce4:de2b prefixlen 64 scopeid 0x0<global>
inet6 fe80::4ee:25c1:2732:51c0 prefixlen 64 scopeid 0x20<link>
ether e4:5f:01:4b:3a:e4 txqueuelen 1000 (Ethernet)
RX packets 157 bytes 24008 (23.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 87 bytes 14755 (14.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 pi@raspberrypi:~ $ ping www.baidu.com
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=55 time=19.8 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=55 time=23.1 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=55 time=22.9 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=4 ttl=55 time=22.9 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=5 ttl=55 time=22.8 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=6 ttl=55 time=24.1 ms
^C
--- www.a.shifen.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 19.849/22.594/24.104/1.306 ms
pi@raspberrypi:~ $

Successfully connected to the network ! Oh yeah. !

0x03 Text conclusion

So let's go here first , A subsequent article on electric lights !!!

My raspberry pie Raspberry Pi Zero 2W Tossing notes , Record more relevant articles about some problems encountered and solutions

  1. Raspberry pie (raspberry pi) Study 4: Change the keyboard layout ( turn )

    Raspberry pie (raspberry pi) After a few uses , Found that the keyboard is always pressed wrong , Some characters can't be typed or typed wrong This problem , Toss me for a long time . Let's share our experience Check online , Found that the keyboard layout is wrong , Raspberry pie (raspberry pi) It's England ...

  2. Raspberry pie (raspberry pi) Change the keyboard layout

    http://blog.csdn.net/c80486/article/details/8460271 Raspberry pie (raspberry pi) After a few uses , Found that the keyboard is always pressed wrong , Some characters can't be typed or typed wrong This problem ...

  3. Raspberry pie (Raspberry Pi) Simple to build lamp service

    Raspberry pie (Raspberry Pi) Simple to build lamp service : 1. LAMP Installation sudo apt-get install apache2 mysql-server mysql-client php ...

  4. Log in and visit raspberry pie Raspberry Pi

    Log in and visit raspberry pie Raspberry Pi Local raspberry pie Raspberry Pi, Can only be accessed within the LAN , How to log in to raspberry pie from the public network Raspberry Pi? This article will introduce the specific implementation steps . 1. accurate ...

  5. Raspberry pie (Raspberry Pi) Use Shell The minimalism of writing Service

    Raspberry pie (Raspberry Pi) The running system is based on Debian Of , Not only can it run Shell, And support systemd and docker, You can write a simple service , Let it run at startup , Perform some automated operations . Here it is Ra ...

  6. Raspberry pie raspberry pi To configure

    (1) International language After the raspberry pie system was first installed , The first time you start it, you get “raspi-config” Tools , Here's the picture :( If not for the first time , In command mode , Please enter  sudo raspi-config  command , You can call up this interface . If you're in a graph ...

  7. Raspberry pie (raspberry pi) Study 11: Turn the raspberry pie into a Web The server ( turn )

    Turn the raspberry pie into a Web The server , By visiting the web , You can control raspberry pie , such as : Check out the camera \ Turn on the lights and so on . at the idea of Linux Web The server , The first thing we think about is ,Apache + MySql + Php. Raspberry pie can be installed ...

  8. Make a raspberry pie Raspberry Pi Polaroid

    With raspberry pie Raspberry Pi Build a Polaroid , The method is as follows : material : Raspberry pie + Digital camera module + Thermal printer Because the printer needs a high current , So the power supply specifications need 5V 3A above . Find a stable power supply and a large enough enclosure ...

  9. VLOG Raspberry pie Raspberry Pi 3 install PLEX And mount USB Hard disk makes the best micro home AV server 2018

    Video introduction Raspberry pie 3 Install the most popular PLEX The server , The realization can reduce the power consumption as much as possible , You can watch and share movies anytime, anywhere . One . Install under raspberry pie PLEX Media server 1. At terminal , Update your raspberry pie to the latest sudo apt up ...

  10. Raspberry pie (raspberry pi) System development

    [ Raspberry pie (raspberry pi)] 01. stay linux Environment for raspberry pie installation system and introduction to a variety of information [ Raspberry pie (raspberry pi)] 02.PI3 install openCV Development environment for image recognition ( A detailed version ) Source : ...

Random recommendation

  1. IIS Profile's XML Incorrect format applicationHost.config collapse Recovery solutions

    When open IIS Manager , Or configure the website with an error : Profile's XML Incorrect format And is applicationHost.config The problem of , So it must be applicationHost.config Be destroyed ,IIS It just broke down ...

  2. concat() Method to connect two or more arrays .

    We created three arrays , And then use concat() Connect them : <script type="text/javascript"> var arr = new Array ...

  3. HDU 5938 Four Operations( arithmetic )

    p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-s ...

  4. Windows Taiwan FailOver Cluster introduction

    First , You need to have some knowledge of server hardware . Let's introduce Windows Platform FailOver to cluster around , Take multiple site scenarios as an example , As shown in the figure below : Eight nodes NODE,Windows Of FailOver to cluster around , rely on SAN The storage synchronizes the various functions ...

  5. iOS Static library of development ( 6、 ... and )—— The battle of time and space

    In all previous tests , Our static libraries support all possible instruction sets (i386, x86_64, armv7, armv7s, arm64), Maximum limit Degree matches all devices that may run the code , Make the code in almost all the existing i ...

  6. About .NET Summary of mail receiving and sending problems

    Reprint :http://www.cnblogs.com/ustbwuyi/archive/2007/05/28/762581.html // Take the maximum sending time in the mail information in the database , That is, the time of the last email received ...

  7. sql - and - or

    sql - and SQL AND links together two or more conditional statements for increased filtering when run ...

  8. OCP Prepare records

    0628: 051 OK053 1-192! Come on , At least once a day 100 Let's review tomorrow 626,627,628 Look at the results of these days first. Yes , Look again at the wrong !! At least 051 Go over it 0629: I've been too busy today only ...

  9. android Medium pixel units dp、px、pt、sp Comparison

    dp(dip): device independent pixels( Device independent pixel ). Different devices have different display effects , This is related to the hardware of the device , Generally we support WVGA.HVGA and QVGA This is recommended , Do not rely on ...

  10. Spark 1.0.0 Version release

    Preface Now Spark Finally a milestone step has been taken ,1.0.0 Marked version number publication Spark1.0 Time .1.0.0 The version number not only adds a lot of new features . And it provides better API Support .Spark SQL Add as a new component . ...