tri-srv-jh: Reading configuration data /home/julian/.ssh/config tri-srv-jh: Reading configuration data /etc/ssh_config tri-srv-jh: Connecting to 10.0.0.30, port 22. tri-srv-jh: Remote protocol version 2.0, remote software version DLINK Corp. SSH server ver 1.00.000 tri-srv-jh: Net::SSH::Perl Version 1.34, protocol version 2.0. tri-srv-jh: No compat match: DLINK Corp. SSH server ver 1.00.000. tri-srv-jh: Connection established. tri-srv-jh: Sent key-exchange init (KEXINIT), wait response. tri-srv-jh: Algorithms, c->s: 3des-cbc hmac-sha1 none tri-srv-jh: Algorithms, s->c: 3des-cbc hmac-sha1 none tri-srv-jh: Entering Diffie-Hellman Group 1 key exchange. tri-srv-jh: Sent DH public key, waiting for reply. tri-srv-jh: Received host key, type 'ssh-dss'. tri-srv-jh: Host '10.0.0.30' is known and matches the host key. tri-srv-jh: Computing shared secret key. tri-srv-jh: Verifying server signature. tri-srv-jh: Waiting for NEWKEYS message. tri-srv-jh: Send NEWKEYS. tri-srv-jh: Enabling encryption/MAC/compression. tri-srv-jh: Sending request for user-authentication service. tri-srv-jh: Service accepted: ssh-userauth. tri-srv-jh: Trying empty user-authentication request. tri-srv-jh: Authentication methods that can continue: password. tri-srv-jh: Next method to try is password. tri-srv-jh: Trying password authentication. tri-srv-jh: Login completed, opening dummy shell channel. tri-srv-jh: channel 0: new [client-session] tri-srv-jh: Requesting channel_open for channel 0. tri-srv-jh: channel 0: open confirm rwindow 10000 rmax 8192 tri-srv-jh: Got channel open confirmation, requesting shell. tri-srv-jh: Requesting service shell on channel 0. tri-srv-jh: channel 1: new [client-session] tri-srv-jh: Requesting channel_open for channel 1. tri-srv-jh: Entering interactive session. ^C #### sub Recup_dlink_DGS { #$ssh = Net::SSH::Perl -> new(@switch_details[1]); #$ssh->login(@switch_details[4], @switch_details[3]); #$ssh->cmd("upload cfg_toTFTP $serveur_tftp @switch_details[2]")"; #sleep 2; #$cmd = "upload cfg_toTFTP $serveur_tftp @switch_details[2]"; my %params = ( protocol => 2, debug => "true"); $ssh = Net::SSH::Perl->new(@switch_details[1], %params); $ssh->login(@switch_details[4], @switch_details[3]); #my ($stdout, $stderr, $exit) = $ssh->cmd($cmd); #print $stdout . "\n"; #print $stderr . "\n"; #print $exit . "\n"; $ssh->cmd("upload cfg_toTFTP $serveur_tftp @switch_details[2]"); #&controle_cfg; #return 1; }