[Ssh-sftp-perl-users] Channel open failure: 1: reason 4: when connecting to Cisco router
Brought to you by:
dbrobins
|
From: <Mic...@co...> - 2005-08-05 20:44:38
|
The script below is trying to connect to a Cisco router via ssh, and is
giving the error messages that follow.
The same code when aimed at a linux server, changing only the host,
user, password and command works fine.=20
Any suggestions are appreciated.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
use strict;
use Net::SSH::Perl;
use Net::SSH::Perl::Cipher;
my $port =3D "ssh";
my $host =3D"xxx.xx.x.x";
my $user =3D "xxxxxxxxx";
my $pass =3D "xxxxxx";
my $cmd =3D "show version";
my $ssh =3D Net::SSH::Perl->new($host,
port =3D> $port,
cipher =3D> Net::SSH::Perl::Cipher::name(3),
debug =3D> 1);
$ssh->login($user, $pass);
my($out, $err) =3D $ssh->cmd($cmd);
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
root@ivan #./test.pl
Reading configuration data /root/.ssh/config
Reading configuration data /etc/ssh_config
Allocated local port 1023.=20
Connecting to XXX.XXX.XXX port 22
Remote protocol version 2.0, remote software version Cisco-1.25
Net::SSH::Perl Version 1.28, protocol version 2.0.
No compat match: Cisco-1.25.
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-rsa'.
Host '172.20.6.3' is known and matches the host key.
Computing shared secret key.
Verifying server signature.
Waiting for NEWKEYS message.
Enabling incoming encryption/MAC/compression.
Send NEWKEYS, enable outgoing encryption/MAC/compression.
Sending request for user-authentication service.
Service accepted: ssh-userauth.
Trying empty user-authentication request.
Authentication methods that can continue: password.
Next method to try is password.
Trying password authentication.
Login completed, opening dummy shell channel.
channel 0: new [client-session]
Requesting channel_open for channel 0.
channel 0: open confirm rwindow 1024 rmax 4096
Got channel open confirmation, requesting shell.
Requesting service shell on channel 0.
channel 1: new [client-session]
Requesting channel_open for channel 1.
Entering interactive session.
Channel open failure: 1: reason 4:
--------------------------------------------------------
Michael deTreville
Cox Communications Central Florida
Broadband Engineering Manager
352-337-2094
|