How To Install perl-Net-SSH-Expect on Fedora 36

In this tutorial we learn how to install perl-Net-SSH-Expect in Fedora 36. perl-Net-SSH-Expect is Net-SSH-Expect - SSH wrapper to execute remote commands

Introduction

In this tutorial we learn how to install perl-Net-SSH-Expect on Fedora 36.

What is perl-Net-SSH-Expect

This module is a wrapper to the ssh executable that is available in your system’s $PATH. Use this module to execute commands on the remote SSH server. It authenticates with the user and password you passed in the constructor’s attributes “user” and “password”. Once an ssh connection was started using the “connect()” method it will remain open until you call the “close()” method. This allows you execute as many commands as you want with the “exec()” method using only one connection. This is a better approach over other ssh wrapper implementations, i.e start a new ssh connection each time a remote command is issued or a file is transfered. It uses Expect.pm module to interact with the SSH server. A “get_expect()” method is provided so you can obtain the internal “Expect” object connected to the SSH server. Use this only if you have some special need that you can’t do with the “exec()” method. This module was inspired by Net <http and by Net modules.

We can use yum or dnf to install perl-Net-SSH-Expect on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Net-SSH-Expect.

Install perl-Net-SSH-Expect on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install perl-Net-SSH-Expect using dnf by running the following command:

sudo dnf -y install perl-Net-SSH-Expect

Install perl-Net-SSH-Expect on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install perl-Net-SSH-Expect using yum by running the following command:

sudo yum -y install perl-Net-SSH-Expect

How To Uninstall perl-Net-SSH-Expect on Fedora 36

To uninstall only the perl-Net-SSH-Expect package we can use the following command:

sudo dnf remove perl-Net-SSH-Expect

perl-Net-SSH-Expect Package Contents on Fedora 36

/usr/share/man/man3/Net::SSH::Expect.3pm.gz
/usr/share/perl5/vendor_perl/Net
/usr/share/perl5/vendor_perl/Net/SSH
/usr/share/perl5/vendor_perl/Net/SSH/Expect.pm
/usr/share/perl5/vendor_perl/Net/SSH/Expect.pod

References

Summary

In this tutorial we learn how to install perl-Net-SSH-Expect on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).