darkoperator / darkoperator/Posh-SSH

Should using -AcceptKey and -Force overwrite saved host key?

Open
#113 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.1k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

I have a situation where I need to regularly connect to a server and do some maintenance which causes the SSH host key to change on that server. Right now I'm using Remove-SSHTrustedHost after the maintenance so that subsequent connections with -AcceptKey will work. I also realize that -Force simply skips host key checking entirely (as intended).

But I'm wondering if it might add convenience if using both -AcceptKey and -Force together would overwrite any existing saved host key without needing to explicitly call Remove-SSHTrustedHost first.

Thoughts? Opinions? I can probably submit a PR if people like the idea.

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 tracing the PowerShell paths for -AcceptKey, -Force, and Remove-SSHTrustedHost to see how saved host keys are handled. Clarify the intended interaction and security implications before changing behavior; done means an existing saved key is replaced when both options are used, with the behavior verified by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
networking, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.