There are two interactions here.
First SSH asks to confirm the server's identity. This is necessary because an adversary might impersonate the server, to tick you into logging in and providing your password or other confidential data. The first time you ever connect to a server, you need to verify the hosts's identity. After this, SSH remembers the association between the host name and the cryptographic identity.
Once SSH is satisfied that it's talking to the intended server, you need to authenticate to the user account on the server by presenting some credentials. If you haven't set up anything else, you get asked for a password.
For the server identity validation, the simplest solution is to connect to the server once from that account. Verify the identity and type “yes”. This decision is recorded in
~/.ssh/known_hosts and you won't get asked again.
You may get asked about the IP address in addition to the host name. This is annoying if the server is on a dynamic IP address. Since the fact that the IP address of the server has changed is rarely interesting, it's usually harmless to disable IP address verification by putting
CheckHostIP no in the configuration file
For user authentication, to be able to run unattended, generate a key pair without a password. On the client machine, run
ssh-keygen and enter an empty passphrase. Then run
ssh-copy-id the-server.example.com to copy the public key to the server (you'll need to enter your password at that point since it's the only way the server can authenticate you so far). After this, SSH will read the key file, and since the key file has no password it can use the key to authenticate without any human intervention.