RPI Model : 3B OS: Ubuntu 20.04
sudo nano /etc/ssh/sshd_config
in the file make following changes
PublicAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication yes
After this, run following two commands
sudo systemctl enable ssh
sudo systemctl restart sshd
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo sh -c 'echo "deb <http://packages.ros.org/ros/ubuntu> $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl
curl -s <https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc> | sudo apt-key add -
sudo apt update