请问你是否阅读了文档? 哪怕 synopsis 就够了 2009/2/19 Michael Zeng <[email protected]>
> > 我有很多机器要 检测 是否能ssh 上, > use strict ; > use lib '/ux/prj/prjhzeng/from_cpan/lib/site_perl/5.8.9' ; > use Net::SSH::Expect ; > > ### non password : > my $ssh = Net::SSH::Expect -> new ( > host => "etiger", > user => "prjhzeng2", > raw_pty => 1 , > ) ; > > $ssh -> run_ssh() or die "\nError !! \n"; > > 对于 不输入密码的, 把hostname 随便乱写, user 乱写,怎么不die 出来呢? > > > > ### has password: > > my $ssh = Net::SSH::Expect -> new ( > host => "etiger", > user => "prjhzeng2", > raw_pty => 1 , > > password = > "dfafaf" , > ) ; > > print $ssh -> login () ; > > 对于要输入密码的: 即使是正常登陆的,也有error 出现,然后把host , user ,password 改了,error一样的, > 这个到底是怎么回事 > > > > > > > > -- > Yours Sincerely > Zeng Hong > > > > --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
