Net::SSH2 authenticate using public key

400 views Asked by At

I'm trying to use Net::SSH2 to execute commands on a remote machine. However, I do not know how to authenticate by using a public key. The documentation mentions this method:

auth_publickey ( username, public key, private key [, password ] )

However, it requires both a public key and a private key. Is there anyway that I can authenticate by just using a public key? Thanks!

1

There are 1 answers

1
ikegami On BEST ANSWER

That makes no sense. "Everyone" has your public key. It can't be used to authenticate you.