asyncssh
asyncssh copied to clipboard
Equivalent of UserKnownHostsFile=/dev/null
Hi Devs,
I'm currently developing kirk SSH support using asyncssh. In particular, I would like to know what's the equivalent of ssh -o UserKnownHostsFile=/dev/null, so I can resolve the following issue: https://github.com/linux-test-project/kirk/issues/51 .
Thanks in advance, Andrea
You can pass in known_hosts=None if you want to completely disable known host checking. However, this is not recommended for security reasons, as it allows a man-in-the-middle attack.
If you are looking for AsyncSSH to prompt the user about whether to trust the host key or not, that's something you would need to build into your application. AsyncSSH intentionally avoids ever writing to SSH config or known hosts files or prompting the end-user for input. It is meant to act as a library, with all such user interactions being the application's responsibility.
Thank you very much!