I am using Ubuntu, most Debian distros will work in a similar manner. For other distros, you will need to check out alternative commands.
To begin with, I am going to assume you have a working copy of Ubuntu 22.04 LTS Desktop. I use the full desktop, the minimal desktop is missing some dependencies. I run the following commands to install.
# Do initial updates to all nodes and install pip
sudo apt update
sudo apt upgrade -y
sudo apt-get -y install python3-pip
# Verify and install SSH
sudo systemctl status sshd
sudo apt install openssh-server -y