2013年10月12日

Perl脚本学习经验(四)--Perl中sftp的使用

摘要: 使用sftp,需要使用Except模块,该模块需要下载安装在perl目录下,可以上http://www.cpan.org/上下载对应的安装包;1.用root用户登录环境;2.cd /usr/lib/perl5/ 3.上传包IO-Tty-1.10.tar.gz 和 Expect-1.21.tar.gz到perl5目录下;4.安装IO-Tty-1.10tar -zxvf IO-Tty-1.10.tar.gzcd IO-Tty-1.10/perl Makefile.PLmakemake testmake install5.安装Expect-1.21tar -zxvf Expect-1.21.tar. 阅读全文

posted @ 2013-10-12 16:25 Kimi_jun 阅读(4497) 评论(0) 推荐(0)

Perl脚本学习经验(三)--Perl中ftp的使用

摘要: 使用use Net::FTP;Demo: my $Server = '192.168.1.1'; my $User = 'admin'; my $Password = 'admin'; my $ftp = Net::FTP->new($Server,Passive => 0, Debug => 1,Timeout => 10) or die "Could not connect.\n"; if (defined $ftp) { if ($ftp->login($User, $Password) o 阅读全文

posted @ 2013-10-12 15:45 Kimi_jun 阅读(1183) 评论(0) 推荐(0)

导航