add tests and fix strict host key checking