Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Upgrade OpenSSH Server on your Ubuntu Distro manually ( tested on 22.04 LTS )

Upgrade OpenSSH Server on your Ubuntu Distro manually ( tested on 22.04 LTS )

Upgrading OpenSSH server on your Ubuntu distribution manually can be necessary when the default repositories do not provide the latest version. Follow these steps to manually upgrade OpenSSH server on Ubuntu.

Step 1: Download the Latest Version

First, download the latest version of OpenSSH:

Step 2: Remove the Existing Installation

Stop the current SSH service and remove existing OpenSSH packages:

Step 3: Install Build Tools

Update your package list and install the necessary build tools:

Step 4: Build and Install OpenSSH

Extract the downloaded tar file and build OpenSSH:

Step 5: Set Up the Service

Create a new systemd service file for SSH:

Paste the following content into the file:

Save and close the file (ctrl+x y enter).

Step 6: Reload the Daemon and Start the Service

Reload the systemd daemon, start, and enable the SSH service:

Step 7: Unmask SSH if Needed

If you encounter issues, unmask the SSH service and repeat the previous step:

Step 8: Check the Status

Finally, check the status of the SSH service:

Conclusion

Manually upgrading OpenSSH server ensures you have the latest security updates and features. Make sure to regularly check for updates and apply them as needed to maintain the security of your system.