[Ssh-sftp-perl-users] Net::SSH::Perl question.
Brought to you by:
dbrobins
From: Mike D. (E. e. preferred) <md...@di...> - 2004-06-23 17:26:43
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I've got a (very short) program that I'm trying to get working with the=20 Net::SSH::Perl module. All it does is connects to a host, issues a command and prints the results. The device in question is a Foundry Switch. =2D ------------------------------------------------------------------- #!/usr/bin/perl use Net::SSH::Perl; $params{debug} =3D 1; $ssh =3D Net::SSH::Perl->new("safn2001", %params); $ssh->login("username", "password"); ($out, $err, $exit) =3D $ssh->cmd("show clock"); print "X: $err, $exit\n"; print $out; =2D ------------------------------------------------------------------- When I run it, I get: =2D ------------------------------------------------------------------- mapping.sandia.gov: Reading configuration data /root/.ssh/config mapping.sandia.gov: Reading configuration data /etc/ssh_config mapping.sandia.gov: Allocated local port 1023. mapping.sandia.gov: Connecting to safn2001, port 22. mapping.sandia.gov: Remote protocol version 1.5, remote software version 1.2.27 mapping.sandia.gov: Net::SSH::Perl Version 1.25, protocol version 1.5. mapping.sandia.gov: No compat match: 1.2.27. mapping.sandia.gov: Connection established. mapping.sandia.gov: Waiting for server public key. mapping.sandia.gov: Received server public key (768 bits) and host key (1024 bits). mapping.sandia.gov: Host 'safn2001' is known and matches the host key. mapping.sandia.gov: Encryption type: IDEA mapping.sandia.gov: Sent encrypted session key. mapping.sandia.gov: Received encryption confirmation. mapping.sandia.gov: Remote: Server does not permit empty password login. mapping.sandia.gov: RSA authentication failed: Can't load public key. mapping.sandia.gov: Trying password authentication. mapping.sandia.gov: Sending command: show clock mapping.sandia.gov: Entering interactive session. Received disconnect message: Illegel commands at /usr/lib/perl5/site_perl/5.8.0/Net/SSH/Perl/SSH1.pm line 369 =2D ------------------------------------------------------------------- I know that the show clock command is valid on the destination server. So, what am I doing wrong? Thanx in advance, =2D --=20 Mike gpg key: http://diehlnet.com/~mdiehl/mdiehl.asc 83AD D927 758D 4BFC A800 0277 4B26 75A4 F0D1 C7EB =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFA2b8ASyZ1pPDRx+sRAoPPAJ0S6xNFgRgvIMvlVqJrl8E7l5WBvQCgxiUg Q2x8MWXv1zxApOuOHDIu7yU=3D =3D10hM =2D----END PGP SIGNATURE----- |