Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixops
base: 72f8770cdfa2
Choose a base ref
...
head repository: NixOS/nixops
compare: abef2ed29058
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Oct 20, 2018

  1. Partially mitigate StrictHostKeyChecking=no issue

    From issue #696:
    
      The hardcoded -o StrictHostKeyChecking=no everywhere is a big SecOps
      no-no. It's quite feasible an attacker could wind up with an IP
      address you neglect to change after relinquishing, and have an entire
      host config hand-delivered to him to inspect for vulnerabilities. He
      wouldn't be able to MITM the the deployment, but obtaining what is
      essentially a dump of the host's whole filesystem is still pretty
      disastrous, from a defensive standpoint.
    
    I by myself have been guilty of using this (added this to the Hetzner
    backend), because I did actually misunderstand the meaning of setting
    this option to no. My understanding was that it will refuse to connect
    whenever an existing host key is different from that in known hosts.
    
    However, this turns out to be only true for keyboard interactive or
    password authentication and if we're using pubkey auth, OpenSSH will
    happily connect.
    
    Now the real fix for this (already deploying with a pre-generated host
    key) is a bit more involved, but we can mitigate this for now, because
    since OpenSSH 7.5 there is the "accept-new" option to
    StrictHostKeyChecking, which does exactly what I thought "no" would do:
    
      If this flag is set to ``accept-new'' then ssh will automatically add
      new host keys to the user known hosts files, but will not permit
      connections to hosts with changed host keys.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Oct 20, 2018
    Configuration menu
    Copy the full SHA
    4917e40 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2018

  1. Merge pull request #1023 from NixOS/strict-hostkey-checking-workaround

    Partially mitigate StrictHostKeyChecking=no issue
    edolstra committed Oct 24, 2018
    Configuration menu
    Copy the full SHA
    abef2ed View commit details
    Browse the repository at this point in the history