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

Hello Monks-

Looking for guidance on debugging the following issue:

I have generated an RSA key on my system that works fine when I use ssh(1) to access my login on either of two target hosts in my network (craigs-mac-mini or new-mac-mini).

I believe I have checked all the basic things:

My perl script to use Net::SSH::Perl is pretty simple, attached below if you are interested.

What should I do next to try and find the issue?

Thanks!

-Craig

#!/opt/homebrew/bin/perl # # ssh -v -o "IdentityFile=$HOME/.cmvtools/toolauth" new-mac-mini # use strict; use warnings; use Net::SSH::Perl; my $host="new-mac-mini"; # FAILS #my $host="craigs-mac-mini"; # WORKS my $cmd="ls -las /"; my $user="cmv"; my $ssh = Net::SSH::Perl->new($host, debug=>1, protocol=>2, interactive=>0, identity_files =>[ "/Users/cmv/.cmvtools/toolauth" ], ); $ssh->login($user); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print "stdout=$stdout\n"; print "stderr=$stderr\n"; print "exit=$exit\n";

Replies are listed 'Best First'.
Re: Successful RSA key fails with Net::SSH::Perl
by bliako (Abbot) on Apr 06, 2023 at 18:09 UTC
      ++bliako The "good" host does not have a No combat match: in its debugging output.

      Thanks for the pointer to the code. I will investigate!