There's more than one way to do things | |
PerlMonks |
Net::SSH::Any using SSH2 Backend and Public Keyby Anonymous Monk |
on Sep 02, 2016 at 18:34 UTC ( [id://1171083]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: Hello, I'll try to make this short. I've successfully been able to connect to my SSH server using Net::SSH2. All is dandy, except I had some issues trying to run commands and gather the output. So that had me trying Net::SSH:Any using the SSH2 backend. I cannot connect as I receive an authentication error. I think I have pegged it to an issue with the publickey file. Net::SSH2 code:
This code works and I connect and can authenticate. But in fact, if I were to place my LOCAL publickey file path where undef currently is I would get authentication errors. I believe with undef it some how infers a .pub file from my private key. From SSH2.pm source: "When libssh2 is compiled using OpenSSL as the crypto backend, passing this method C<undef> as the public key argument is acceptable (OpenSSL is able to extract the public key from the private one)."
Here I get an authentication error. I understand that it's looking for the .pub file, which I do have in the same directory as my privatekey file. Everything seems correct here. I've searched all over Google and Perl Monks for an answer and I appreciate all the info from Salva (that has helped me get Net::SSH2 up and running) but I cannot find too much about SSH::Any with SSH2 backend. Thanks for any help, from a beginnner.
Back to
Seekers of Perl Wisdom
|
|