[Ssh-sftp-perl-users] Calc.pm
Brought to you by:
dbrobins
From: <Fra...@gl...> - 2005-06-29 14:23:15
|
Hello, I want my perl program to connect to a server using SSH. I want to connect to remote servers I've never been before. In fact, the program's aim will be to copy a public key on several = remote servers. Here is the error raised by perl : Not an ARRAY = reference at /usr/local/share/perl/5.8.4/Math/BigInt/Calc.pm line 222. = As far as I am concerned I had lots of difficulties to get the = Net:SSH:perl lib to compile through the cpan shell. Here is my code : $adresse_ip=3D"192.168.100.54"; $user=3D"user"; $pass=3D"xxxx"; $params{debug} =3D 1; $params{interactive} =3D 0; $params{protocol} =3D '2,1'; $ssh =3D Net::SSH::Perl->new($adresse_ip,%params,options =3D>["BatchMode = yes","RhostsRSAAuthentication no"]); $ssh->login($user, $pass); = ($stdout, $stderr, $exit) =3D $ssh->cmd("ls"); print $stdout; print $stderr; print $exit; Here is the debug output :=20 Reading configuration data /home/kudjat/.ssh/config Reading configuration data /etc/ssh_config Connecting to 195.110.248.210, port 22. Remote protocol version 2.0, remote software version OpenSSH_3.7.1p1 = Net::SSH::Perl Version 1.28, protocol version 2.0. No compat match: = OpenSSH_3.7.1p1. Connection established. Sent key-exchange init = (KEXINIT), wait response. Algorithms, c->s: 3des-cbc hmac-sha1 none = Algorithms, s->c: 3des-cbc hmac-sha1 none Entering Diffie-Hellman Group = 1 key exchange. Sent DH public key, waiting for reply. Received host = key, type 'ssh-dss'. Host '195.110.248.210' is known and matches the = host key. Not an ARRAY reference at = /usr/local/share/perl/5.8.4/Math/BigInt/Calc.pm line 222. Many thanks for your help. Regards, Fran=E7ois PS : I am running perl on a Debian 2.4.27-1-386 Perl version is 5.8.4 CPAN version is 1.7601 Net::SSH::Perl Version 1.28, protocol version 2.0. |