How To Install libnet-sftp-sftpserver-perl on Debian 12

Learn how to install libnet-sftp-sftpserver-perl on Debian 12 with this tutorial. libnet-sftp-sftpserver-perl is Secure File Transfer Protocol Server

Introduction

In this tutorial we learn how to install libnet-sftp-sftpserver-perl on Debian 12.

What is libnet-sftp-sftpserver-perl

libnet-sftp-sftpserver-perl is:

Net::SFTP::SftpServer is a Perl port of sftp-server from OpenSSH providing access control on a per user and per command basis with improved logging via syslog.

This version of the Net::SFTP::SftpServer Perl module currently implements SSH File Transfer Protocol version 3.

The limitations compared with the OpenSSH implementation are as follows:

  • Only files and directories are dealt with - other inode types are not returned on readdir.
  • A virtual chroot is performed - / (rootfs) is treated as the users home directory from the client perspective and all file access to / will be in /<home_path>/. The <home_path> is defined on object initialisation, it is not obtained from /etc/passwd.
  • All symlinked files or directories can be hidden and made inaccessible on request. Symlink returns “permission denied” then, readlink returns “file does not exist”.
  • Setting of stats (set_stat or set_fstat) is disabled - the client will receive permission denied.
  • Permissions for files and dirs are defaulted - the defaults are set on object initialisation.

There are three methods to install libnet-sftp-sftpserver-perl on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libnet-sftp-sftpserver-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libnet-sftp-sftpserver-perl using apt-get by running the following command:

sudo apt-get -y install libnet-sftp-sftpserver-perl

Install libnet-sftp-sftpserver-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libnet-sftp-sftpserver-perl using apt by running the following command:

sudo apt -y install libnet-sftp-sftpserver-perl

Install libnet-sftp-sftpserver-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libnet-sftp-sftpserver-perl using aptitude by running the following command:

sudo aptitude -y install libnet-sftp-sftpserver-perl

How To Uninstall libnet-sftp-sftpserver-perl on Debian 12

To uninstall only the libnet-sftp-sftpserver-perl package we can use the following command:

sudo apt-get remove libnet-sftp-sftpserver-perl

Uninstall libnet-sftp-sftpserver-perl And Its Dependencies

To uninstall libnet-sftp-sftpserver-perl and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove libnet-sftp-sftpserver-perl

Remove libnet-sftp-sftpserver-perl Configurations and Data

To remove libnet-sftp-sftpserver-perl configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge libnet-sftp-sftpserver-perl

Remove libnet-sftp-sftpserver-perl configuration, data, and all of its dependencies

We can use the following command to remove libnet-sftp-sftpserver-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libnet-sftp-sftpserver-perl

Dependencies

libnet-sftp-sftpserver-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libnet-sftp-sftpserver-perl package on Debian 12 using different package management tools: apt, apt-get and aptitude.