Based on docstring this method accepting the following parameters:
Docstring: Session.userauth_publickey_fromfile(self, username, privatekey, passphrase='', publickey=None) Authenticate with public key from file.
But official project description has this example:
session.userauth_publickey_fromfile( username, 'my_pkey.pub', 'my_pkey', '')
So in this example the second parameter is a public key, but the docstring says it has to be a private key.
Also there are 2 positional arguments in docstring but 4 in the given example.
So what is the correct combination of parameters?
Thanks in advance.
P.S. Moreover it is not clear which format should be the privatekey and the publickey presented in. Should it be like a path to the files or bytes? If it is in bytes, then why the whole function called "_fromfile"? Very confusing.