mymoon
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору снимаю конфы через ssh на роутерах cisco Код: #!/usr/bin/perl -w use Net::SSH::Perl; use Net::SSH::Perl::Cipher; use Net::SSH::Perl::Channel; my $host="116.67.27.212"; my $user="user"; my $pass="pass"; $cmd='copy running-config ftp://anon:spass@211.125.182.119/backup'; $ssh = Net::SSH::Perl->new($host, protocol => 2, debug => 1); $ssh->login($user, $pass); $ssh->register_handler("stdout", sub { my($channel, $buffer) = @_; $channel->open; $channel->register_handler(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION); $channel->cmd($cmd); $channel->close; }); | и получаю Код: 123: Computing shared secret key. 123: Verifying server signature. 123: Waiting for NEWKEYS message. 123: Enabling incoming encryption/MAC/compression. 123: Send NEWKEYS, enable outgoing encryption/MAC/compression. 123: Sending request for user-authentication service. 123: Service accepted: ssh-userauth. 123: Trying empty user-authentication request. 123: Authentication methods that can continue: password. 123: Next method to try is password. 123: Trying password authentication. 123: Login completed, opening dummy shell channel. 123: channel 0: new [client-session] 123: Requesting channel_open for channel 0. 123: channel 0: open confirm rwindow 1024 rmax 4096 123: Got channel open confirmation, requesting shell. 123: Requesting service shell on channel 0. | пробовал стандартными способами, но результата нет, пишет мол канал не открыт) |