Skip to content
New issue

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

default host key policy to RejectPolicy #2280

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anarcat
Copy link

@anarcat anarcat commented Sep 6, 2023

It's a really bad idea to silently accept new keys. It's not how SSH works, and it's not how Fabric should work. If we'd work like SSH, we'd prompt the user, but the WarningPolicy doesn't do that, it just warns, and doesn't prompt.

At the very least those policies should noisily warn the user when the host keys get changed, but that's something Paramiko must do.

An alternative to this would be WarningPolicy but I think it's too light and possibly too late: when you warn, Fabric probably has time to run the bad stuff before the operator notices and interrupts.

It's a really bad idea to silently accept new keys. It's not how SSH
works, and it's not how Fabric *should* work. If we'd work like SSH,
we'd *prompt* the user, but the WarningPolicy doesn't do that, it just
warns, and doesn't prompt.

At the very least those policies should noisily warn the user when the
host keys get changed, but that's something Paramiko must do.

An alternative to this would be WarningPolicy but I think it's too
light and possibly too late: when you warn, Fabric probably has time
to run the bad stuff before the operator notices and interrupts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant