cristianekw has asked for the wisdom of the Perl Monks concerning the following question:
Hello
I´m having many problems to make a SSH connection works here. I'm using Windows. I tried to use Net::SSH::Perl but it generated the following error:
Here is the code
What am I doing wrong?
I´m having many problems to make a SSH connection works here. I'm using Windows. I tried to use Net::SSH::Perl but it generated the following error:
I tried to use Net::SSH::W32Perl but it generated the following error (Math::BigInt and Math::BigInt::FastCalc are installed):Can't set socket non-blocking: Bad file descriptor at C:/Perl/site/lib +/Net/SSH/Perl.pm line 216.
Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt::FastCalc at C:/Perl/site/lib/Crypt/DSA/KeyChain.pm line 6 Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt::FastCalc at C:/Perl/site/lib/Crypt/DSA/Key.pm line 6 Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt::FastCalc at C:/Perl/site/lib/Crypt/DSA/Util.pm line 6 Not an ARRAY reference at C:/Perl/site/lib/Math/BigInt/Calc.pm line 25 +1.
Here is the code
#!/usr/bin/perl -w use Net::SSH::W32Perl; use Win32; $ENV{USERNAME} = Win32::LoginName(); $ENV{HOME} = Win32::GetFolderPath( Win32::CSIDL_PERSONAL ); $ip = 'x.x.x.x'; $ssh = Net::SSH::W32Perl->new($ip); $ssh->login("username","password"); ($out,$err,$ext) = $ssh->cmd("ls"); $ssh->close();
What am I doing wrong?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problems in Net::SSH
by zentara (Archbishop) on Jan 29, 2008 at 23:17 UTC | |
by syphilis (Archbishop) on Jan 30, 2008 at 07:05 UTC | |
by cristianekw (Novice) on Jan 30, 2008 at 10:47 UTC | |
by syphilis (Archbishop) on Jan 30, 2008 at 12:15 UTC | |
Re: Problems in Net::SSH
by hesco (Deacon) on Sep 17, 2011 at 04:23 UTC |
Back to
Seekers of Perl Wisdom