We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm having some difficulty shifting from connect to AuthHandler when using the client module
I used the type definitions from @types/ssh2 to help me through, idk how that's automatically downloaded when I install ssh2 but thats cool...
A ConnectConfig has privateKey field. A PublicKeyAuthMethod has key field.
privateKey
key
Are they both private keys or is one supposed to be a public key?
Here's my code for reference:
const Client = require("ssh2").Client const sshClient = new Client() sshClient.connect({ host : myServer, port : 22, username : "milo", authHandler : function(methodsLeft, partialSuccess, doNextAuth){ let authConfig={ type : "publickey", host : myServer, username : "milo", key : key } doNextAuth(authConfig) } })
vs
const Client = require("ssh2").Client const sshClient = new Client() sshClient.connect({ type : "publickey", host : myServer, username : "milo", privateKey : key // privateKey ~/.ssh/id_rsa in plaintext })
Thanks!
The text was updated successfully, but these errors were encountered:
The documentation in the README states about the key property:
Can be a string, Buffer, or parsed key containing a private key
Sorry, something went wrong.
No branches or pull requests
I'm having some difficulty shifting from connect to AuthHandler when using the client module
I used the type definitions from @types/ssh2 to help me through, idk how that's automatically downloaded when I install ssh2 but thats cool...
A ConnectConfig has
privateKey
field.A PublicKeyAuthMethod has
key
field.Are they both private keys or is one supposed to be a public key?
Here's my code for reference:
vs
Thanks!
The text was updated successfully, but these errors were encountered: