Ref T1049. This messages is always printed to standard error now that the known hosts file is set to /dev/null. This hides the warning so that we'll be able to parse stderr for Windows hosts (where Powershell decides to output XML...)
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T1049: Implement Harbormaster
- Commits
- Restricted Diffusion Commit
rPb163883d88c6: Hide "Warning: Permanently added ... to the list of known hosts." in…
Tested locally and verified the warning no longer appears.
Diff Detail
- Repository
- rP Phabricator
- Branch
- hide-ssh-warning
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 2360 Build 2364: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
I don't like that this may hide other errors, but don't have a cleaner approach. At some point down the line maybe we can add host pinning, build a real known hosts file, and use that if the user configures it.
The problem with using real host pinning is EC2, especially when you have multiple blueprints that allocate different platform types (where the SSH key might be different and thus make SSH fail the host check).
Actually a better idea is probably to use TempFile to write out a known_hosts and then use that to connect, so we validate that we're connecting to the right machine (especially since we have the credential and can get the public key).
I think we would store the fingerprint on the resource, so the allocator would just be responsible for handling it. That should be fine across platforms/AMIs/etc.
I'll land this for now and do the TempFile stuff later (since that needs TempFiles created on resources and whatnot).
Yeah, the file thing (particularly if we're pre-seeding it with the right fingerprint) feels like a 2020 feature.