use File::HomeDir; $ENV{HOME} = File::HomeDir->my_home; use Net::SSH::Perl; use warnings; $scon = Net::SSH::Perl->new ("10.0.0.2",protocol=>'1,2',port => '22',debug => '1',interactive=>'1',); $scon->login("cisco","cisco"); print "looking around ...\n"; ($output,$errors,$exit) = $scon->cmd("sho ip route"); print $output; #### debug dump C:\>perl ssh.pl Name "main::exit" used only once: possible typo at ssh.pl line 9. Name "main::errors" used only once: possible typo at ssh.pl line 9. PC-200911281232: Reading configuration data C:\Documents and Settings\Administra tor/.ssh/config PC-200911281232: Reading configuration data /etc/ssh_config PC-200911281232: Connecting to 10.0.0.2, port 22. PC-200911281232: Remote protocol version 1.5, remote software version Cisco-1.25 PC-200911281232: Net::SSH::Perl Version 1.34, protocol version 1.5. PC-200911281232: No compat match: Cisco-1.25. PC-200911281232: Connection established. looking around ... PC-200911281232: Waiting for server public key. PC-200911281232: Received server public key (768 bits) and host key (512 bits). PC-200911281232: Host '10.0.0.2' is known and matches the host key. PC-200911281232: Encryption type: DES3 PC-200911281232: Sent encrypted session key. PC-200911281232: Received encryption confirmation. PC-200911281232: Trying password authentication. PC-200911281232: Sending command: sho ip route PC-200911281232: Entering interactive session. Terminating on signal SIGINT(2) C:\>