Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Module Net::SSH Host Key Verification failed

Status
Not open for further replies.

llrivers

Technical User
Jan 2, 2007
2
US
Hello,



I have 2 Sun systems, 1 Sol8, the other Sol9, both have the same version of ssh, perl, and the PM module is installed on the Solaris 8 server only. I am trying to login using net::ssh perl module within a script and can not get it working.

I have a problem with my Net::SSH PM failing with the error Host Key Verification failed.

- I ran the ssh-keygen(ssh-keygen -b 1024 -t rsa) to setup rsa keys,
- copied the keys into the authorized_keys file on both systems with both systems keys,
- tested manually if I could login to both systems without a passwd and it works fine.

- I checked logs for failed ssh attempts but none were logged.
- I looked for ways to debug the script but can not find a way to debug the command "Net::SSH qw(sshopen2)".

Does anyone know how to debug this and/or know what I am missing in my ssh environment that is causing this?


TIA!!!


Lrivers
 
can you post your actual script? Did you try the example that comes with the module?
 
I think you can put:

$DEBUG = 1;

in the script to turn on debugging.

- Kevin, perl coder unexceptional!
 
Something like this should work for you.

Code:
my $ssh = Net::SSH::Perl->new($host, debug => 1);

or

Code:
%params = {
     port => 22,
     protocol => 2,
     debug => 1
}

my $ssh = Net::SSH:Perl->new($host, %params);

Ethan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top