- Use Raspberry Pi Imager to install the Raspberry Pi OS (maybe 64-bit version). Change the setting before burning:
- Use password to login with a new user. You have to setup a new user in the newer version of Raspberry Pi OS. Otherwise, SSH will refuse to connect.
- Setup WiFi connection: SSID, password and region (e.g. 'CN'). Warning, use 2.4GHz band instead of 5GHz band for the most of the time.
- Open SSH. This is closed by default.
- Set the hostname.
raspberrypi.localby default.
- In a computer that connects to the same router, use command
ping [hostname](e.g.ping raspberrypi.local) to get the IP address of the Raspberry Pi. - Connect to the Raspberry Pi by SSH.
- Use command
ssh [username]@[IP]. - Add new host to the local computer. Sometimes, you reinstall the OS on the Raspberry Pi, the key validation might get broken. In this scenario, you should delete the previous known host first in your
~/.ssh/known_hosts. - Enter the password and done.
- Connect to the Raspberry Pi by VNC.
- Through SSH, use command
sudo raspi-config. Enter the sub menu ofInteraction Settingand turn on theVNC connection. Finish the configuration when it is ready byCtrl+F. - Install VNC Viewer in your local machine.
- Connect the Raspberry Pi by its
[IP]address. Be aware of changing display resolution to a lower level due to performance limitation.
- Connect to the Raspberry Pi by Windows
mstsc. This is not recommended since the performance is not so great. Just use command in the remote devicesudo apt-get install xrdp. - Connect to the Raspberry Pi by Visual Studio Code. Install the plugin
Remote - SSHin VS Code and it is almost the same as connecting via SSH in the following steps.