Domino has asked for the wisdom of the Perl Monks concerning the following question:

Hello All,
I am running into a problem using the Net::SSH::Perl module to ssh into switches (both Foundry and Cisco). It seems that login just isn't working right. Here is the debug information:

Reading configuration data /root/.ssh/config Reading configuration data /etc/ssh_config Allocated local port 1023. Connecting to switch.generic.com, port 22. Remote protocol version 1.5, remote software version 1.2.27 Net::SSH::Perl Version 1.23, protocol version 1.5. No compat match: 1.2.27. Connection established. Waiting for server public key. Received server public key (768 bits) and host key (1024 bits). Host 'switch.generic.com' is known and matches the host key. Encryption type: IDEA Sent encrypted session key. Received encryption confirmation. Remote: Server does not permit empty password login. RSA authentication failed: Can't load public key. Trying password authentication. Sending command: blah Entering interactive session. Received disconnect message: Illegel commands

Here is the code:

my %params = ( protocol => 1, debug => "true", interactive => "true" ) +; $ssh = Net::SSH::Perl->new($serverName, %params); $ssh->login($user, $pass); $ssh->cmd("blah");

The error "Illegel commands" just sounds plain wierd. I have checked and know that I can login to the switch from the same machine this code runs on with the user and password specified in the program. Any help anyone can give me would be appriciated.