Install Raspberry Pi OS using Raspberry Pi Imager

Raspberry Pi Imager is the quick and easy way to install Raspberry Pi OS and other operating systems to a microSD card, ready to use with your Raspberry Pi.

Download and install Raspberry Pi Imager to a computer with an SD card reader. Put the SD card you’ll use with your Raspberry Pi into the reader and run Raspberry Pi Imager.

When you are ready to continue, the Raspbian OS will be written to the SD card.

Once the write is completed, remove the SD card, and insert it into the Raspberry Pi SD card slot. Give the Raspberry Pi power by plugging the power cord into the wall. It should start booting up. We are login on the raspberry pi using ubuntu os, wifi and ssh – (no needed extra monitor or keyboard)

Install OpenSSH Server

SSH server is not installed and enabled by default in Ubuntu 22.04 LTS. So, we will install the OpenSSH server from the default Ubuntu packages repository and then enable the SSH connections. Type the following command to install the OpenSSH server package on Ubuntu 22.04 system:

$ sudo apt update
$ sudo apt install openssh-server

$ sudo systemctl status ssh

To start or stop the SSH service, use the following command:

$ sudo systemctl start ssh

$ sudo systemctl stop ssh

If the service is not running properly on your system, you can enable the SSH service on your Ubuntu system using this command:

$ sudo systemctl enable ssh

Configure SSH Port in Firewall UFW

The firewall UFW should be enabled and activated on your Ubuntu system. Enable the firewall UFW settings if it is not enabled on your Ubuntu system using this command:

$ sudo ufw enable

After enabling the UFW setting, allow ssh port 22 in the UFW firewall using this command:

$ sudo ufw allow 22/tcp

Connect to SSH Server on Ubuntu 22.04 LTS

After enabling the SSH server, you can use it to initiate remote connections and can also accept incoming connection requests. Use the following ssh command to connect SSH server remotely:

$ ssh username@remotehost or your IP-address

For example, here, we will connect to the Ubuntu 22.04 SSH server with an IP address 128.45.2.15 as the user “koner”:

$ ssh koner@128.45.2.15 

Tip: update and upgrade Raspberry Pi OS when connected to your Raspberry Pi