那里
在Net :: SSH2 :: Simple上,将
Windows7更新到Windows10后,不再通过ssh进行连接。
有以下错误。
Net::SSH2::net_ss_timeout: invalid object Net::SSH2::Simple=SCALAR(0x3f5c218) at C:/Strawberry/perl/vendor/lib/Net/SSH2.pm line 111.
at C:/Strawberry/perl/vendor/lib/Net/SSH2.pm line 111.
Net::SSH2::connect(Net::SSH2::Simple=SCALAR(0x3f5c218), "xxxx.com", 22) called at C:/tool/eclipse_classic/workspace/test/work14.pl line 98
(in cleanup) Net::SSH2::net_ss_DESTROY: invalid object Net::SSH2::Simple=SCALAR(0x3f5c218) at C:/tool/eclipse_oxygen/eclipse/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 4211.
我的代码是
use Net::SSH2::Simple;
$ssh2 = Net::SSH2::Simple->new();
$ssh2->connect( 'xxxx.com', 22 ) ;
$ssh2->auth_password( 'username', 'passwd' );
错误出现在“ $ ssh2-> connect”行。
但是
此代码通过使用Net :: SSH2可以正常工作。
仅Net :: SSH2 :: Simple不起作用。
到xxxx.com的连接就可以了。找不到用户名,密码错误。
我该如何解决。
Windows10 64位
Strawberry Perl 5.30.1.1(64位)
Eclipse Oxygen
EPIC 0.77
谢谢
Net :: SSH2 :: Simple 0.01已于2009年12月13日发布。当时Net :: SSH2为0.28(2009-10-24),现在为0.70(2019-3-17)。
通过安装早期版本的Net :: SSH2 0.58(2015-12-20),我得到了Net :: SSH2 :: Simple可以在Windows10 64bit / Strawberry Perl 5.30.0.1(64bit)上运行
cpan install SALVA/Net-SSH2-0.58.tar.gz
版本0.59_20(2016-05-11)给出了'net_ss_timeout:invalid object'错误。版本0.59_01的更改日志有此警告
** WARNING: this release includes lots of changes, some visible, most internal. Regressions are expected. Also, it introduces some minor backward incompatible changes - but in those cases, the old behavior was broken or insane anyway.
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句