Install perl Net::SFTP module in linux

by jagbir on June 20, 2008

When installing perl Net::SFTP module in CentOS 5 box:

# perl -MCPAN -e 'install Net::SSH::Perl'

It got stuck at:


then I tried installation with force so that it can skip tests if any of them failed:

# perl -MCPAN -e 'force install Net::SSH::Perl'

The module seems installed ok but while using in a script, error occured:
Can’t locate Net/SSH/Perl/ in @INC …

that means, the module still not installed/configured properly. To get it done, I searched for rpms and found rpmforge repository have all the sufficient rpms:

# rpm -ivh /usr/src/rpmforge-release-0.3.4-1.el4.rf.i386.rpm
# yum install perl-Net-SSH-Perl --enablerepo=rpmforge

and its done.

  • Brent Harsh

    Was this for SSH or SFTP? You mentioned SFTP in the title but your examples show you trying to install SSH instead. Just curious.

    I’m using RPMFORGE quite a bit these days instead of cpan or manually building perl modules and I came across this entry searching for the SFTP RPM.

    • jagbir

      @Brent: SFTP is just a subcomponent of SSH suite, therefore after installation of perl’s SSH module, you can make use of SFTP as well.

  • Pingback: scottsdale teeth whitening

Previous post:

Next post: