I have the following code that I am running and if you look at the
debug output you will see the last line says: "Channel open failure:
1: reason 1: bla bla".
This otherwise looks like valid output for teh connection.
Any idea what this means? Or how to get this to work?
Ed
================================================
#!/usr/bin/perl
use Net::SSH::Perl;
$serverName = "x.x.x.201";
$user = "edavison";
$pass = "pass";
my %params = ( protocol => "2,1", debug => "true", interactive => "false",
use_pty => 0 );
$ssh = Net::SSH::Perl->new($serverName, %params);
$ssh->login($user, $pass);
($out,$err,$exit) = $ssh->cmd("show ip eth 3 1");
print "results:\n$out\n";
================================================
+-(~/security/tp)> ./get_stats_ssh.pl
cbacc-security3: Reading configuration data /home/bfdi533/.ssh/config
cbacc-security3: Reading configuration data /etc/ssh_config
cbacc-security3: Connecting to x.x.x.201, port 22.
cbacc-security3: Remote protocol version 2.0, remote software version
OpenSSH_2.0
cbacc-security3: Net::SSH::Perl Version 1.25, protocol version 2.0.
cbacc-security3: Compat match: 'OpenSSH_2.0' matches pattern
'^OpenSSH[-_]2\.[012]'.
cbacc-security3: Connection established.
cbacc-security3: Sent key-exchange init (KEXINIT), wait response.
cbacc-security3: Algorithms, c->s: 3des-cbc hmac-sha1 none
cbacc-security3: Algorithms, s->c: 3des-cbc hmac-sha1 none
cbacc-security3: Entering Diffie-Hellman Group 1 key exchange.
cbacc-security3: Sent DH public key, waiting for reply.
cbacc-security3: Received host key, type 'ssh-dss'.
cbacc-security3: Host 'x.x.x.201' is known and matches the host key.
cbacc-security3: Computing shared secret key.
cbacc-security3: Verifying server signature.
cbacc-security3: Waiting for NEWKEYS message.
cbacc-security3: Enabling incoming encryption/MAC/compression.
cbacc-security3: Send NEWKEYS, enable outgoing encryption/MAC/compression.
cbacc-security3: Sending request for user-authentication service.
cbacc-security3: Service accepted: ssh-userauth.
cbacc-security3: Trying empty user-authentication request.
cbacc-security3: Authentication methods that can continue: publickey,password.
cbacc-security3: Next method to try is publickey.
cbacc-security3: Publickey: testing agent key '/home/bfdi533/.ssh/id_rsa'
cbacc-security3: Authentication methods that can continue: publickey,password.
cbacc-security3: Next method to try is publickey.
cbacc-security3: Publickey: testing agent key '/home/bfdi533/.ssh/id_dsa'
cbacc-security3: Authentication methods that can continue: publickey,password.
cbacc-security3: Next method to try is publickey.
cbacc-security3: Trying pubkey authentication with key file
'/home/bfdi533/.ssh/id_dsa'
Enter passphrase for keyfile '/home/bfdi533/.ssh/id_dsa':
cbacc-security3: Loading private key failed.
cbacc-security3: Next method to try is password.
cbacc-security3: Trying password authentication.
cbacc-security3: Login completed, opening dummy shell channel.
cbacc-security3: channel 0: new [client-session]
cbacc-security3: Requesting channel_open for channel 0.
cbacc-security3: channel 0: open confirm rwindow 0 rmax 16384
cbacc-security3: Got channel open confirmation, requesting shell.
cbacc-security3: Requesting service shell on channel 0.
cbacc-security3: channel 1: new [client-session]
cbacc-security3: Requesting channel_open for channel 1.
cbacc-security3: Entering interactive session.
cbacc-security3: Channel open failure: 1: reason 1: bla bla
results:
+-(~/security/tp)>
--
-
Ed Davison
|