steelbrain / steelbrain/node-ssh

Quick example of connecting with publicKey?

Open
#420 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1k
Forks
94
PR merge metrics
No merged PRs in 30d

Description

Hi, I've seen that there is another similar question, but I still hope you as the creator of this very useful tool can help.

Basically I'm creating a small tool which would allow me to connect to my servers using one or another SSH key, and do some minot things there (file read/write).

While it's pretty obvious how to connect with a privateKey, and it works well, I see nowhere any docs on publicKey.

I've tried simply replacing privateKey with publicKey, but it seems like it's ignoring it.

Fails with: error {"level":"client-authentication"} Error: All configured authentication methods failed

So, do you have any quick tips maybe, if it's possible to easily tell ssh to use public key instead of private key? I mean, not sure if it should make a big difference...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the node-ssh authentication documentation and the SSH2 authentication options referenced by the publicKey and privateKey examples. Determine whether publicKey-only authentication is supported, then document the correct configuration or clearly state the limitation, including the authentication failure shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, networking
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.