Complete the code to generate an SSH key pair on Raspberry Pi.
ssh-keygen -t [1] -b 2048 -f ~/.ssh/id_rsa
The rsa algorithm is commonly used for SSH key generation and is widely supported.
Complete the command to copy your SSH public key to the Raspberry Pi for passwordless login.
ssh-copy-id [1]@raspberrypi.localThe default user on Raspberry Pi OS is pi, so you copy the key to that user.
Fix the error in the command to enable the UFW firewall on Raspberry Pi.
sudo ufw [1]The correct command to enable UFW is sudo ufw enable.
Fill both blanks to allow SSH and deny all other incoming connections using UFW.
sudo ufw [1] ssh sudo ufw [2] incoming
First, allow SSH connections with allow. Then deny all other incoming connections with deny.
Fill all three blanks to disable password authentication and root login in SSH config.
sudo sed -i 's/[1] yes/[2] no/' /etc/ssh/sshd_config sudo sed -i 's/[3] yes/[2] no/' /etc/ssh/sshd_config sudo systemctl restart sshd
Replace PasswordAuthentication yes with no to disable password login, and PermitRootLogin yes with no to disable root login.