SSH Key Workflow with FileZilla: Not using PuTTY for Raspberry Pi Bullseye/Bookworm Upgrade
In this article, we will discuss how to use an SSH key workflow with FileZilla while upgrading your Raspberry Pi OS from Buster to Bullseye or Bookworm. This method does not involve using PuTTY, which is commonly used on Windows systems.
Why use SSH keys with FileZilla?
SSH keys provide a secure and automated way of logging into a remote server. By using SSH keys with FileZilla, you can avoid the need to enter your username and password every time you connect to your Raspberry Pi. This is especially useful when performing operations that require frequent file transfers, such as upgrading the OS.
Prerequisites
Before we begin, make sure you have the following:
- A Raspberry Pi running Raspbian Buster
- A computer running Windows, macOS, or Linux
- FileZilla client installed on your computer
- PuTTYgen (Windows) or ssh-keygen (macOS/Linux) to generate SSH keys
Generating SSH keys
First, you need to generate a new SSH key pair on your computer.
On Windows:
- Open PuTTYgen.
- Click the
Generatebutton to create a new key pair. - Save the private key to a secure location on your computer.
- Copy the public key to your clipboard.
On macOS/Linux:
- Open Terminal.
- Run
ssh-keygen -t rsato generate a new key pair. - Save the private key to a secure location on your computer.
- Copy the public key to your clipboard.
Adding the SSH key to the Raspberry Pi
Next, you need to add the public key to the Raspberry Pi's authorized_keys file.
- Connect to your Raspberry Pi using SSH.
- Create the
.sshdirectory in your home folder if it doesn't exist. - Create the
authorized_keysfile in the.sshdirectory. - Paste the public key into the
authorized_keysfile. - Change the permissions of the
.sshdirectory and theauthorized_keysfile.
Configuring FileZilla
Now you can configure FileZilla to use the SSH key for file transfers.
- Open FileZilla.
- Go to
Edit > Settings. - Click on
SFTPunder theConnectioncategory. - Click the
Add keyfilebutton and select your private key. - Click
OKto save the settings.
Upgrading Raspbian to Bullseye/Bookworm
With FileZilla configured to use SSH keys, you can now upgrade Raspbian to Bullseye or Bookworm.
- Connect to your Raspberry Pi using FileZilla.
- Navigate to the
/etc/aptdirectory. - Edit the
sources.listfile and replacebusterwithbullseyeorbookworm. - Save the changes and close the file.
- In the FileZilla terminal, run
sudo apt-get updateto update the package lists. - Run
sudo apt-get full-upgradeto upgrade the OS.
In this article, we discussed how to use an SSH key workflow with FileZilla to upgrade Raspbian on a Raspberry Pi from Buster to Bullseye or Bookworm. By using SSH keys, you can avoid the need to enter your username and password every time you connect to your Raspberry Pi, making file transfers and upgrades more convenient and secure.
References
-
Raspberry Pi Documentation: SSH
-
FileZilla Documentation: SFTP Overview
-
Debian Wiki: SSH Keys