Check that known_hosts file is a real file before inserting into SSH con...

Follow up to pull request #10866.