I would appreciate some information.

I am trying to use RSA/DSA key authentication for ssh(scp etc) so I
don't need to type password each time when transferring files between
my host and server machines. I implemented this in my code. But I
noticed that to talk to the machine and does not have an entry in my
known_hosts file, I still need to hit "yes" manually when the
fingerprint warning prompts up.

Is there a way to make ssh/scp completely work without human
intervention using public key authentication and also bypass the
known_hosts file?