SSH host key checking cannot disable when using proxy jump

The ProxyJump issues another ssh process, that does not inherit the command-line arguments that you specify on the command-line of the first ssh command. There are two possible ways out:

  • Use these options in configuration file in ~/.ssh/config -- it can save you a lot of typing too!

    Host jumpbox
      User jumpuser
      StrictHostKeyChecking=no
      UserKnownHostsFile=/dev/null
      IdentityFile ~/.ssh/id_jumpuser_rsa
    

    and then you can connect just as ssh -J jumpbox [email protected].

  • Use ProxyCommand option instead -- it does the same job, but more transparently so you can see what is actually going on there:

    ssh -o ProxyCommand="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_jumpuser_rsa -W %h:%p jumpuser@jumpbox" -i ~/.ssh/id_jumpuser_rsa [email protected]