paramiko / paramiko/paramiko

No way to add a host key from a string

Open
#1,134 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Keys
Dominant language
Python
Stars
9.9k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

It seems there is currently no way to add a host key from a string, but rather only a file. See http://docs.paramiko.org/en/2.4/api/hostkeys.html.

I would suggest either exposing the HostKeys.entries attribute so that HostKeyEntrys can be added directly, or adding some proxy methods on the HostKeys class for adding/removing/updating HostKeyEntrys.

Furthermore, it would be nice if the HostKey class could load from a file-like object.

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 with the HostKeys API documentation and the HostKeys.entries, HostKeyEntry, and HostKey entry points mentioned in the issue. Compare the existing file-loading behavior with the requested string and file-like-object inputs, then confirm that host keys can be added, removed, or updated through a documented interface with tests covering the supported inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.